\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{LAnjdv3.7}[2012/11/12 v0.1 Standard LaTeX document class for Journal]
%
\def\copyrightyear{2022}%
%
\newskip\tabmoveskip%
\tabmoveskip=0pt%

%\newcommand{\ArticleTypeDefns}{%
% \if@ArticleTypeProvided\else%
%    \typeout{^^J***********************^^J%
%      RA    - Research article^^J%
%      SC    - Short communication^^J%
%      LTE   - Letter to editor^^J%
%      ED    - Editorial^^J%
%      TR    - Transcript^^J%
%      RV    - Review^^J%
%      PR    - Perspective^^J%
%      TU    - Tutorial^^J%
%      MRV   - Mini-review^^J%
%      SP    - Spotlight^^J%
%      HL    - Historical^^J%
%      RC    - Rapid communication^^J%
%      LSA   - Letter - spectral assignment^^J%
%      LCR   - Letters - case report^^J%
%      LAN   - Letter - application note^^J%
%      LC    - Letter - Correspondence^^J%
%      ER    - Erratum^^J%
%      MRC   - MRC letters^^J%
%Note to TS: Provide the any one of the above options for article type^^J%
%    ************************^^J}%
%  \Warning\fi%
%}
%


%%%%%%%%%%%%%%%%%%%%%%%%%%% Article Front Matter %%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Article Type
\newbox\articletypebox%
\newdimen\articletypedim%
%

\newif\ifAPARefstyle%
\newif\ifNOneedAMSref%
\newif\ifAMSRefstyle%
\newif\ifAMARefstyle%
\newif\ifVancouverrefstyle%
\newif\ifChemistryrefstyle%
\newif\ifSymbolFootnote%
\newif\ifAPAListstyle%

\newif\ifWileyLogo%
\newif\ifJournalLogo%
\newif\ifSocietyLogo%
\newif\ifWileyJournalLogo%

\newif\ifFPP%
\newif\ifEV%
\newif\ifIssue%

\chardef\dotlessi="10%

\def\articletype#1{%
 \gdef\@ArtType{#1}%
  \gdef\@categoryname{#1}%
  \gdef\article@type{#1%
  }%
  \gdef\ArtType{\letterspacetwty{#1}}%
}%

\newif\if@restonecol
\newif\if@titlepage   \@titlepagefalse
\newif\if@cropmarkson \@cropmarksonfalse
\newif\if@draftruleson\@draftrulesonfalse
\newif\if@proofon     \@proofonfalse
\newif\if@finalon     \@finalonfalse%
\newif\if@webpdfon    \@webpdfonfalse%
\newif\if@querynoteon \@querynoteonfalse
\newif\if@watermarkon \@watermarkonfalse
\newif\if@linenumberon\@linenumberonfalse
\newif\if@hyperrefon  \@hyperrefonfalse
\newif\if@croppage    \@croppagefalse
\newif\if@exactptsize \@exactptsizefalse
\newif\if@xml\global\@xmlfalse
\newif\ifinformationbox \global\informationboxtrue
\newif\if@pagenumber \global\@pagenumberfalse
\newif\if@prooffinal \global\@prooffinalfalse
\newif\if@revisestage \global\@revisestagefalse
\newif\if@pagenum   \@pagenumfalse
\newif\if@print@query  \global\@print@queryfalse
\newif\if@DarkBlue  \global\@DarkBluefalse%
\newif\if@LightBlue \global\@LightBluefalse%
\newif\if@AppleGreen\global\@AppleGreenfalse%
\newif\if@RedOrange \global\@RedOrangefalse%
\newif\if@Orange    \global\@Orangefalse%
\newif\ifsmalllayout\global\smalllayoutfalse%%26Feb18_PSK%%
\newif\if@TwoColLayout\global\@TwoColLayoutfalse%

\def\templatepath{}%
\def\Stypath{}%
\def\commontemplatepath{}%
\def\FDpath{}%
\def\LOGOpath{}%

\def\XMT@template@path{\Stypath}%
\def\template@path{\commontemplatepath}%
\def\dummyalphabet{\vphantom{abcdefghijklmnopqrstuvwxyz0123456789}}

%% Template Options
\newif\ifpurexml\global\purexmlfalse%
\newif\if@AC    \global\@ACfalse
\newif\if@font@stix\global\@font@stixfalse%
\newif\if@font@stixtwo\global\@font@stixtwofalse%
\newif\if@large@design\global\@large@designtrue%
\newif\if@small@design\global\@small@designfalse%

\DeclareOption{purexml}{\global\purexmltrue}%
\DeclareOption{AC}{\global\@ACtrue}%Article Category
\DeclareOption{a4paper}{\PassOptionsToPackage{a4}{crop}}
\DeclareOption{a3paper}{\PassOptionsToClass{a3paper}{article}\PassOptionsToPackage{a3}{crop}}
\DeclareOption{centre}{\PassOptionsToPackage{center}{crop}}
\DeclareOption{crop}{\PassOptionsToPackage{cam}{crop}\global\@cropmarksontrue}
\DeclareOption{nocrop}{\PassOptionsToPackage{off}{crop}\global\@cropmarksontrue}
\DeclareOption{info}{\PassOptionsToPackage{info}{crop}}
\DeclareOption{noinfo}{\PassOptionsToPackage{noinfo}{crop}}
\DeclareOption{draftrules}{\global\@draftrulesontrue}
\DeclareOption{watermark}{\global\@watermarkontrue}
\DeclareOption{lineno}{\global\@linenumberontrue}
\DeclareOption{query}{\global\@querynoteontrue}
\DeclareOption{hyperref}{\global\@hyperrefontrue}
\DeclareOption{croppage}{\global\@croppagetrue\global\@cropmarksontrue}%
\DeclareOption{exactsize}{\global\@exactptsizetrue}%
\DeclareOption{noexactsize}{\global\@exactptsizefalse}%
\DeclareOption{stix}{\global\@font@stixtrue}%
\DeclareOption{stixtwo}{\global\@font@stixtwotrue}%
\DeclareOption{TwoColLayout}{\global\@TwoColLayouttrue}%

%%%%%%%%%%%%articletype check definitions%%%%%%%%%%%%%%%%%%%

\newif\if@ArticleTypeProvided\global\@ArticleTypeProvidedfalse%
\newif\if@OA    \global\@OAfalse%research article  
\newif\if@SC    \global\@SCfalse%short communication  
\newif\if@LTE   \global\@LTEfalse%Letter to editor 
\newif\if@ED    \global\@EDfalse%Editorial  
\newif\if@TR    \global\@TRfalse%Transcript  
\newif\if@ARS    \global\@ARSfalse%Advances in Remote Sensing of Rainfall and Snowfall
\newif\if@OA    \global\@OAfalse%research article  
\newif\if@PR    \global\@PRfalse%Perspective  
\newif\if@RC    \global\@RCfalse%Rapid Communication%  
\newif\if@TU    \global\@TUfalse%Tutorial%
\newif\if@MRV   \global\@MRVfalse%Mini-review%
\newif\if@SP    \global\@SPfalse%Spotlight%
\newif\if@HL    \global\@HLfalse%Historical%
\newif\if@RC    \global\@RCfalse%Rapid communication%
\newif\if@LSA   \global\@LSAfalse%Letter - spectral assignment%
\newif\if@LCR   \global\@LCRfalse%Letters - case report%
\newif\if@LAN   \global\@LANfalse%Letter - application note%
\newif\if@LC    \global\@LCfalse%Letter - Correspondence%
\newif\if@ER    \global\@ERfalse%Erratum%
\newif\if@CNM   \global\@CNMfalse%CNM letters%
\newif\if@CG    \global\@CGfalse%Corrigendum%
\newif\if@NC    \global\@NCfalse%NOTES AND CORRESPONDENCE%
\newif\if@REV    \global\@REVfalse%REVIEW%

\DeclareOption{OA}{\global\@DarkBluetrue\global\@OAtrue\global\@ArticleTypeProvidedtrue\articletype{}}%Research Article
\DeclareOption{SC}{\global\@AppleGreentrue\global\@SCtrue\global\@ArticleTypeProvidedtrue\articletype{SHORT COMMUNICATION}}%Short Communication
\DeclareOption{LTE}{\global\@AppleGreentrue\global\@LTEtrue\global\@ArticleTypeProvidedtrue\articletype{LETTER TO EDITOR}}%Letter to Editor
\DeclareOption{ED}{\global\@RedOrangetrue\global\@EDtrue\global\@ArticleTypeProvidedtrue\articletype{EDITORIAL}}%Editorial
\DeclareOption{TR}{\global\@RedOrangetrue\global\@TRtrue\global\@ArticleTypeProvidedtrue\articletype{TRANSCRIPT}}%Transcript
\DeclareOption{RV}{\global\@Orangetrue\global\@RVtrue\global\@ArticleTypeProvidedtrue\articletype{REVIEW}}%Review
\DeclareOption{PR}{\global\@Orangetrue\global\@PRtrue\global\@ArticleTypeProvidedtrue\articletype{PERSPECTIVE}}%Perspective
\DeclareOption{TU}{\global\@Orangetrue\global\@TUtrue\global\@ArticleTypeProvidedtrue\articletype{TUTORIAL}}%Tutorial
\DeclareOption{MRV}{\global\@Orangetrue\global\@MRVtrue\global\@ArticleTypeProvidedtrue\articletype{MINI-REVIEW}}%Mini-review
\DeclareOption{SP}{\global\@RedOrangetrue\global\@SPtrue\global\@ArticleTypeProvidedtrue\articletype{SPOTLIGHT}}%Spotlight
\DeclareOption{HL}{\global\@Orangetrue\global\@HLtrue\global\@ArticleTypeProvidedtrue\articletype{HISTORICAL}}%Historical
\DeclareOption{RC}{\global\@AppleGreentrue\global\@RCtrue\global\@ArticleTypeProvidedtrue\articletype{RAPID COMMUNICATION}}%Research Article
\DeclareOption{LSA}{\global\@RedOrangetrue\global\@LSAtrue\global\@ArticleTypeProvidedtrue\articletype{LETTER - SPECTRAL ASSIGNMENT}}%Letter - spectral assignment
\DeclareOption{LCR}{\global\@RedOrangetrue\global\@LCRtrue\global\@ArticleTypeProvidedtrue\articletype{LETTERS - CASE REPORT}}%Letters - case report
\DeclareOption{LAN}{\global\@RedOrangetrue\global\@LANtrue\global\@ArticleTypeProvidedtrue\articletype{LETTER - APPLICATION NOTE}}%Letter - application note
\DeclareOption{LC}{\global\@RedOrangetrue\global\@LCtrue\global\@ArticleTypeProvidedtrue\articletype{LETTER - CORRESPONDENCE}}%Letter - Correspondence
\DeclareOption{ER}{\global\@LightBluetrue\global\@ERtrue\global\@ArticleTypeProvidedtrue\articletype{ERRATUM}}%Erratum
\DeclareOption{CNM}{\global\@AppleGreentrue\global\@CNMtrue\global\@ArticleTypeProvidedtrue\articletype{CNM LETTERS}}%CNM letters

\newif\ifcategoryone\global\categoryonefalse%
\newif\ifcategorytwo\global\categorytwofalse%
\newif\ifcategorythr\global\categorythrfalse%
\newif\ifcategoryfou\global\categoryfoufalse%
\newif\ifcategoryfiv\global\categoryfivfalse%
\newif\ifcategorysix\global\categorysixfalse%
\newif\ifcategoryseven\global\categorysevenfalse%
\newif\ifcategoryeight\global\categoryeightfalse%
\newif\ifcategorynine\global\categoryninefalse%

\def\ignorecategory#1{%
  \ifcategoryone\else%%Announcement%%
  \ifcategorytwo\else%%Book Review%%
  \ifcategorythr\else%%Commentary%%
  \ifcategoryfou\else%%Editorial%%
  \ifcategoryfiv\else%%Letter to the Editor%%
  \ifcategorysix\else%%Letter to the Editor%%
  \ifcategoryseven\else%%Letter to the Editor%%
  \ifcategorynine\else%%Letter to the Editor%%
  #1%
  \fi\fi\fi\fi\fi\fi\fi\fi%
}%

%% Workflow Options
\DeclareOption{final}{%%%23March
\global\@pagenumtrue
\global\@printerpdftrue%
\global\@proofonfalse%
\global\@cropmarksontrue
\global\@linenumberonfalse%
\global\informationboxfalse
\global\@watermarkonfalse%
\global\@hyperrefontrue%
\gdef\link@color{black}}%

\newif\if@printerpdf\global\@printerpdffalse

%% Classfile Options
\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
\DeclareOption{twoside}{\@twosidetrue  \@mparswitchtrue}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\DeclareOption{titlepage}{\@titlepagetrue}
\DeclareOption{notitlepage}{\@titlepagefalse}
\DeclareOption{onecolumn}{\@twocolumnfalse}
\DeclareOption{twocolumn}{\@twocolumntrue}
\DeclareOption{openbib}{\let\if@openbib\iftrue}

\ExecuteOptions{twosidecrop,crop,centre,info,exactsize,croppage,twocolumn}

\ProcessOptions
\RequirePackage{\commontemplatepath latexrelease}%
 \LoadClass[twoside,twocolumn]{article}%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% SUPPORTING PACKAGES Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\gdef \@makecol {%
   \ifvoid\footins
     \setbox\@outputbox \box\@cclv
   \else
     \setbox\@outputbox \vbox {%
       \boxmaxdepth \@maxdepth
       \unvbox \@cclv
       \vskip \skip\footins
       \color@begingroup
         \normalcolor
   \ifthanks\thanksFNrule\else\footnoterule\fi%
         \unvbox \footins
       \color@endgroup
       \global\thanksfalse%
       }%
   \fi
   \let\@elt\relax
   \xdef\@freelist{\@freelist\@midlist}%
   \global \let \@midlist \@empty
   \@combinefloats
   \ifvbox\@kludgeins
     \@makespecialcolbox
   \else
     \setbox\@outputbox \vbox to\@colht {%
       \@texttop
       \dimen@ \dp\@outputbox
       \unvbox \@outputbox
       \vskip -\dimen@
       \@textbottom
       }%
   \fi
   \global \maxdepth \@maxdepth
}

%\AtBeginDocument{\ifx\jnlprefix\empty\@ClassError{Journal-Code}{Please check your TeX filename}{}\else\fi}
%\RequirePackage{\Stypath EMI_STD-spec}%
\RequirePackage{\commontemplatepath graphicx}%
\RequirePackage{\commontemplatepath multicol}
\RequirePackage{\commontemplatepath multirow}
\RequirePackage{\commontemplatepath ifpdf}
\RequirePackage{url}\def\UrlFont{}%\urlstyle{sf}
\RequirePackage[strict]{\commontemplatepath changepage}
\RequirePackage{calc}
\RequirePackage[normalem]{ulem}%%
\RequirePackage{\commontemplatepath soul}
\RequirePackage{\commontemplatepath pstricks}
\RequirePackage{\commontemplatepath float}
\RequirePackage{\commontemplatepath floatpag}
\floatpagestyle{headings}%
\rotfloatpagestyle{headings}%modified from plain to headings to get header and footer for sidewaystable%
\if@TwoColLayout\RequirePackage{\commontemplatepath dblfloatfix}\fi%%%    % To enable figures at the bottom of page
\RequirePackage{\commontemplatepath xstring}%
\RequirePackage{\commontemplatepath marginnote}%
\RequirePackage{\commontemplatepath textcomp}%
\RequirePackage[figuresright]{\commontemplatepath rotating}%
\usepackage{\commontemplatepath alphalph}
%\usepackage[pagecontinue=true,alphMult=ab,AlphMulti=AB,fnsymbolmult=true,romanMult=true,RomanMulti=true]{\commontemplatepath pagesLTS}
\AtBeginDocument{\pagenumbering{arabic}} %% for pagesLTS package
\RequirePackage{etoolbox}%
\RequirePackage{\commontemplatepath everypage}
\RequirePackage{afterpage}
\RequirePackage{\commontemplatepath fancybox}
\cornersize{.2}
\RequirePackage{\commontemplatepath wrapfig}% %%LN 09feb2016
\usepackage{\commontemplatepath pstricks}
\psset{cornersize=absolute,linearc=.5\baselineskip} 
\RequirePackage{\commontemplatepath booktabs}
\RequirePackage{\commontemplatepath longtable}
\if@xml\RequirePackage[draft]{hyperref}\else\fi%
\if@hyperrefon%
\RequirePackage[breaklinks]{\commontemplatepath hyperref}% dvips,
\RequirePackage{\commontemplatepath breakurl}%
\RequirePackage{afterpage}%
\RequirePackage{dsfont}

\def\UrlFont{\reset@font\fontfamily{\rmdefault}\selectfont}%
\else%
\RequirePackage[breaklinks]{hyperref}%dvips,
\RequirePackage{breakurl}%
\def\UrlFont{\reset@font\fontfamily{\rmdefault}\selectfont}%
\fi%

\RequirePackage{\commontemplatepath varwidth}
%\usepackage{datatool-base}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% FONTS / COLOR DECLARATION Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\if@exactptsize%
  \def\set@fontsize#1#2#3{%
    \@defaultunits\@tempdimb#2bp\relax\@nnil%
    \edef\f@size{\strip@pt\@tempdimb}%
    \@defaultunits\@tempskipa#3bp\relax\@nnil%
    \edef\f@baselineskip{\the\@tempskipa}%
    \edef\f@linespread{#1}%
    \let\baselinestretch\f@linespread%
    \def\size@update{%
      \baselineskip\f@baselineskip\relax%
      \baselineskip\f@linespread\baselineskip%
      \normalbaselineskip\baselineskip%
      \setbox\strutbox\hbox{\vrule\@height.7\baselineskip\@depth.3\baselineskip\@width\z@}%
      \let\size@update\relax%
    }%
  }%
\fi%

\newskip\displayskipamount%
\displayskipamount=12\p@ \@plus2\p@ \@minus0\p@%

\renewcommand\normalsize{%
  \@setfontsize\normalsize{10bp}{11bp}\textbaselineskip%
  \abovedisplayskip 12\p@ \@plus2\p@ \@minus0\p@
  \abovedisplayshortskip \z@ \@plus3\p@%
  \belowdisplayshortskip 13\p@ \@plus3\p@ \@minus3\p@%
  \belowdisplayskip \abovedisplayskip%
  \let\@listi\@listI}%
\newcommand{\textbaselineskip}{\baselineskip11pt plus 0.01pt minus 0.01pt}%
\normalsize%
\textbaselineskip%
%\flushbottom%

\newcommand\eqsmallfont{%
  \@setfontsize\normalsize{7bp}{9bp}\textbaselineskip%
  \abovedisplayskip 5.5\p@ \@plus2\p@ \@minus0\p@
  \abovedisplayshortskip \z@ \@plus3\p@%
  \belowdisplayshortskip 3\p@ \@plus3\p@ \@minus3\p@%
  \belowdisplayskip \abovedisplayskip%
  \let\@listi\@listI}%

\newcommand\linenumberfnt{%
  \if@font@stix%
    \@setfontsize\linenumberfnt{10bp}{13bp}\textbaselineskip%
  \else%
  \if@font@stixtwo%
    \@setfontsize\linenumberfnt{10bp}{13bp}\textbaselineskip%
  \else%
    \@setfontsize\linenumberfnt{8bp}{13bp}\textbaselineskip%
  \fi\fi%
  \let\@listi\@listI}%


\newcommand\medsize{%
  \@setfontsize\small\@viipt{9}%
  \abovedisplayskip 5\p@ \@plus3\p@ \@minus4\p@
  \abovedisplayshortskip \z@ \@plus2\p@
  \belowdisplayshortskip 3\p@ \@plus2\p@ \@minus2\p@
  \def\@listi{%
    \leftmargin\leftmargini
    \topsep 4\p@ \@plus2\p@ \@minus2\p@
    \parsep 2\p@ \@plus\p@ \@minus\p@
    \itemsep \parsep}%
  \belowdisplayskip\abovedisplayskip}
\renewcommand\small{%
  \@setfontsize\small\@vpt{7}%
  \abovedisplayskip 5\p@ \@plus3\p@ \@minus4\p@
  \abovedisplayshortskip \z@ \@plus2\p@
  \belowdisplayshortskip 3\p@ \@plus2\p@ \@minus2\p@
  \def\@listi{%
    \leftmargin\leftmargini
    \topsep 4\p@ \@plus2\p@ \@minus2\p@
    \parsep 2\p@ \@plus\p@ \@minus\p@
    \itemsep \parsep}%
  \belowdisplayskip \abovedisplayskip}
\renewcommand\footnotesize{%
  \@setfontsize\footnotesize{7.5}{9}%
  \abovedisplayskip 5\p@ \@plus2\p@ \@minus4\p@
  \abovedisplayshortskip \z@ \@plus\p@
  \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
  \def\@listi{%
    \leftmargin\leftmargini
    \topsep 3\p@ \@plus\p@ \@minus\p@
    \parsep 2\p@ \@plus\p@ \@minus\p@
    \itemsep \parsep}%
  \belowdisplayskip \abovedisplayskip}
\renewcommand\scriptsize{\@setfontsize\scriptsize\@ixpt\@ixpt}
\newcommand\scrisize{\@setfontsize\scrisize{9.3}{9}}
\renewcommand\tiny{\@setfontsize\tiny\@vpt\@vipt}
\renewcommand\large{\@setfontsize\large{12}{14}}
\newcommand\larg{\@setfontsize\larg{11}{13}}
\renewcommand\Large{\@setfontsize\Large{16}{18}}
\newcommand\fpe{\@setfontsize\fpe{19}{21}}
\renewcommand\LARGE{\@setfontsize\LARGE\@xviipt{22}}
\newcommand\rke{\@setfontsize\rke{10}{10}}
\newcommand\ke{\@setfontsize\ke{9}{10}}
\newcommand\lke{\@setfontsize\lke{8.4}{8.25}}
\newcommand\ffe{\@setfontsize\ffe{9}{12}}
\newcommand\adf{\@setfontsize\adf{10.3}{12}}
\newcommand\kes{\@setfontsize\kes{8}{9.5}}
\newcommand\bis{\@setfontsize\bis{9}{10}}
\newcommand\tdf{\@setfontsize\tdf{14}{16}}
\newcommand\svo{\@setfontsize\svo{14.5}{16}}
\renewcommand\huge{\@setfontsize\huge\@xxpt{25}}
\renewcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
%
\DeclareMathSizes{24bp}{24}{16.06}{10}%
\DeclareMathSizes{15bp}{15}{10}{5}%
\DeclareMathSizes{9bp}{9}{6.02}{5.5}
\DeclareMathSizes{8bp}{8}{5.35}{4.1}%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% FONT DECLARATION Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% FONTS / COLOR DECLARATION Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\def\dummyalphabet{\vphantom{abcdefghijklmnopqrstuvwxyz0123456789}}
%
\sodef\letterspacetwty{}{.2em}{.4em plus1em}{.5em plus 1em minus1em }%%Artcategory
\sodef\letterspaceone{}{.1em}{.2em plus1em}{.2em plus 1em minus1em }%%Keywords
\sodef\letterspaceonetwtysix{}{.18em}{.2em plus1em}{.2em plus 1em minus1em }%%Figure_and_Table_Name
\sodef\letterspaceeleven{}{.015em}{.2em plus1em}{.2em plus 1em minus1em }%Reference_Heading
%
\definecolor{Black}{gray}{0}
\definecolor{White}{cmyk}{0.0,0.0,0.0,0.0}
\definecolor{Tcolor}{cmyk}{1,0.8,0.0,0.0}%
\definecolor{Jcolor}{cmyk}{0.0,0.85,1,0.0}%
\definecolor{rgray}{cmyk}{0.0,0.0,0.0,0.4}%
\definecolor{lightgray}{cmyk}{0.0,0.0,0.0,0.2}
\definecolor{Blue}{cmyk}{1,0.77,0.0,0.0}
%

  \def\infoboxfont{\fontfamily{tim}\fontsize{8}{8}\selectfont}%
  %
  \def\pagenumfont{\rmfamily\fontsize{10}{10}\bfseries\selectfont}%
  \def\cnmpagenumfont{\rmfamily\fontsize{10}{10}\selectfont}%
  \def\runningfootfont{\rmfamily\fontsize{8}{10}\selectfont}%
  \def\titlepageheadfont{\rmfamily\fontsize{7}{9}\selectfont}%
  %
  \def\BRarttypefont{\reset@font\rmfamily\fontsize{18}{18}\fontseries{bl}\selectfont}%
  \def\pubheadfont{\reset@font\rmfamily\fontsize{7}{9}\fontseries{bl}\selectfont}%
  \def\arttypefont{\rmfamily\fontsize{18}{20}\fontseries{bl}\fontshape{tr}\selectfont}%
  \def\titlefont{\rmfamily\fontsize{18}{22}\bfseries\selectfont\mathversion{bold}\raggedcenter%
  \def\textsc##1{{\fontsize{12}{22}\selectfont\uppercase{##1}}}}%
  \def\subtitlefont{\rmfamily\fontsize{16}{21}\bfseries\selectfont\leftskip\z@\rightskip\z@ plus1fil}%
  \def\authorfont{\rmfamily\fontsize{11}{13}\bfseries\selectfont%
  \def\textsc##1{{\fontsize{8}{13}\selectfont\uppercase{##1}}}}%
  \def\addressfont{\rmfamily\fontsize{7}{9}\selectfont}%
  \def\corresfont{\hsize\abs@coli@hsize\rmfamily\fontsize{7.5}{9}\selectfont\leftskip\z@\rightskip\z@ plus1fil}%
  %
  \def\FIfont{\hsize\abs@coli@hsize\rmfamily\fontsize{8}{11}\selectfont\leftskip\z@\rightskip\z@ plus1fil}%
  \def\JELfont{\rmfamily\fontsize{8}{10}\selectfont}%
  \def\algolinenumfont{\rmfamily\fontsize{8}{13}\selectfont}%
  \def\abstractfont{\rmfamily\fontsize{8}{10}\selectfont}%
  \def\keywordsfont{\rmfamily\fontsize{8}{10}\selectfont}%
  %
  \def\sectionfont{\rmfamily\fontsize{10}{12}\fontseries{b}\fontshape{tr}\selectfont\mathversion{bold}\ifcategorytwo\else\leftskip\z@\rightskip\z@ plus1fil\fi}%
  \def\unnumsectionfont{\rmfamily\fontsize{10}{13}\fontseries{b}\fontshape{tr}\selectfont\mathversion{bold}\leftskip\z@\rightskip\z@ plus1fil}%
  \def\appsectionfont{\rmfamily\fontsize{10}{13}\bfseries\selectfont\mathversion{bold}}%

  \def\subsectionfont{\rmfamily\fontsize{10}{12}\itshape\selectfont\mathversion{bold}\leftskip\z@\rightskip\z@ plus1fil}%
  \def\appsubsectionfont{\rmfamily\fontsize{8}{11}\bfseries\selectfont\mathversion{bold}\leftskip\z@\rightskip\z@ plus1fil}%

  \def\subsubsectionfont{\rmfamily\fontsize{12}{13}\itshape\selectfont\leftskip\z@\rightskip\z@ plus1fil}%
  \def\appsubsubsectionfont{\rmfamily\fontsize{8}{11}\bfseries\selectfont\mathversion{bold}\leftskip\z@\rightskip\z@ plus1fil}%

  \def\paragraphfont{\rmfamily\fontsize{10.5}{13}\itshape\selectfont}%
  \def\appparagraphfont{\rmfamily\fontsize{8}{11}\fontseries{bl}\selectfont}%

 \def\subparagraphfont{\rmfamily\fontsize{10}{13}\fontseries{bl}\selectfont}%
 \def\appsubparagraphfont{\rmfamily\fontsize{8}{11}\fontseries{bl}\selectfont}%

%  \def\appsectionfont{\rmfamily\fontsize{8}{11}\fontseries{b}\fontshape{tr}\selectfont\ifcategorytwo\else\leftskip\z@\rightskip\z@ plus1fil\fi}%
  %
  \def\boxheadfont{\rmfamily\fontsize{8}{10}\fontseries{bl}\selectfont}
  \def\boxtitlefont{\rmfamily\fontsize{8}{10}\bfseries\selectfont}
  %
  \def\GnSabsfont{\rmfamily\fontsize{9}{15}\selectfont}%
  \def\GnSabsfootfont{\reset@font\rmfamily\fontsize{14}{0}\bfseries\selectfont}%
  %
  \def\suppinfofont{\noindent\rmfamily\normalsize}%
  \def\suppinfoheadfont{\noindent\fontsize{10}{13}\fontseries{b}\fontshape{tr}\selectfont}%
  \def\orcidheadfont{\rmfamily\fontsize{10}{13}\fontseries{b}\fontshape{tr}\selectfont}%
  \def\suppinfocaptionfont{\noindent\rmfamily}%
  %
  \def\figurenumfont{\rmfamily\fontsize{10bp}{12}\fontseries{bl}\selectfont}%%LN
  \def\figurecaptionfont{\rmfamily\fontsize{10bp}{12}\fontseries{bl}\selectfont}%
  \def\bwfiginfofont{\fontfamily{tim}\fontsize{10bp}{10bp}\selectfont}%
  %

\newcommand{\gabstitfnt}{\@setfontsize\gabstitfnt{15}{18}\bfseries}%
\newcommand{\QJgabstitfnt}{\@setfontsize\QJgabstitfnt{18}{22}\bfseries}%
\newcommand{\QJgabsauthfnt}{\@setfontsize\QJgabsauthfnt{12}{16}\bfseries}%


  \def\tablenumfont{\rmfamily\fontsize{10bp}{12bp}\fontseries{bl}\selectfont}%
  \def\tablecaptionfont{\rmfamily\fontsize{10bp}{12bp}\bfseries\selectfont}
  \def\tablebodyfont{\rmfamily\fontsize{9bp}{11bp}\selectfont}
  \def\tablecolheadfont{\rmfamily\fontsize{9bp}{11bp}\selectfont\bfseries\serifboldmath\mathversion{bold}}
  \def\tablefootnotefont{\rmfamily\fontsize{6bp}{8bp}\selectfont\leftskip0pt \rightskip0pt plus1fill{}}
  %
  \def\footnotetextfont{\rmfamily\fontsize{7bp}{9bp}\selectfont}
  \def\abbrevfont{\rmfamily\fontsize{8bp}{11bp}\selectfont}
  \def\endnotefont{\rmfamily\fontsize{8.5bp}{11.5bp}\selectfont}%
  %
  \def\listfont{\normalsize}%
  %
  \def\refheadfont{\fontsize{10}{13}\fontseries{b}\fontshape{tr}\selectfont}%
  \def\reflistfont{\fontsize{8.5}{11.5}\selectfont}%
  \def\listingfnt{\fontsize{11}{12}\selectfont}%
  %
  \def\biographyheadfont{\fontsize{8}{10}\fontseries{b}\fontshape{tr}\selectfont}
  %
  \def\ackheadfont{\fontsize{10}{13}\selectfont\fontseries{b}\fontshape{tr}\selectfont}%
  %
%%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% FONTS / COLOR DECLARATION Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% LAYOUT SETTING Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\newlength\trimwidth
\newlength\trimheight
\newlength\typewidth
\newlength\typeheight
\newlength\normaltextheight
\newlength\blindfoliodrop
\newlength\figheight
\newlength\figwidth
\newlength\tabledim

\setlength\paperwidth{178mm}%
\setlength\paperheight{254mm}%

%\setlength\typeheight{62\baselineskip}
\setlength\textheight{56\baselineskip}%
\setlength\typewidth{143.76mm}
\setlength\textwidth{143.76mm}
\setlength\normaltextheight{\textheight}
\setlength\headheight{8\p@}%
\setlength\headsep   {17.2pt}%
\setlength\topskip   {0\p@}%
\setlength\splittopskip   {\topskip}
\setlength\columnsep{13pt}%
\setlength\columnseprule{0\p@}
\newdimen\columnhsizevalue%
\columnhsizevalue=\textwidth%
\advance\columnhsizevalue by -\columnsep%
\divide\columnhsizevalue by 2%

\setlength\topmargin{4pc}%
\addtolength\topmargin{4.79\p@}%14Feb
\setlength\oddsidemargin{58\p@}%
\setlength\evensidemargin{60\p@}%
\setlength\footskip{47.8\p@}%%%%14Feb
\setlength\maxdepth{4\p@}

\setlength{\marginparsep}{18\p@}%
\setlength{\marginparwidth}{5mm}%

\setlength\footnotesep{5.75\p@}
\setlength{\skip\footins}{18pt plus2pt minus2pt}%

\setlength\parindent{13pt}% \z@

\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}
\renewcommand\baselinestretch{}
\parskip=0pt%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% PENALTY SETTING Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%

% Page break penalties
\@lowpenalty   51
\@medpenalty  151
\@highpenalty 301

% Disallow widows and orphans
\clubpenalty 10000
\widowpenalty 10000
\exhyphenpenalty=10000%  hyphenated words will not get hyphenated further.

% Disable page breaks before equations, allow pagebreaks after
% equations and discourage widow lines before equations.
\displaywidowpenalty 100
\predisplaypenalty   10000
\postdisplaypenalty  0

% Set these global demerits
\doublehyphendemerits 1000000   % corresponds to badness 800
\finalhyphendemerits  1000000  % corresponds to badness 1000

% Allow loose lines rather than overfull lines
\vbadness=9999
\tolerance=9999

% Allow breaking the page in the middle of a paragraph
%% \interlinepenalty 0

% Disallow breaking the page after a hyphenated line
\brokenpenalty 10000

% Hyphenation; don't split words into less than three characters
\lefthyphenmin=3
\righthyphenmin=3

% Float placement parameters

% The total number of floats that can be allowed on a page.
\setcounter{totalnumber}{10}

% The maximum number of floats at the top and bottom of a page.
\setcounter{topnumber}{5}
\setcounter{bottomnumber}{5}

% The maximum part of the top or bottom of a text page that can be
% occupied by floats. This is set so that at least four lines of text
% fit on the page.
\renewcommand\topfraction{.921}
\renewcommand\bottomfraction{.921}

% The minimum amount of a text page that must be occupied by text.
% This should accomodate four lines of text.
\renewcommand\textfraction{.13}

% The minimum amount of a float page that must be occupied by floats.
\renewcommand\floatpagefraction{.921}

% The same parameters repeated for double column output
\setcounter{bottomnumber}{3}%
\setcounter{dbltopnumber}{3}%

\renewcommand\dbltopfraction{.921}
\renewcommand\dblfloatpagefraction{.7}

% Space between floats
\setlength\floatsep    {18\p@ \@plus 2\p@ \@minus 2\p@}

% Space between floats and text
\setlength\textfloatsep{14.3\p@ \@plus 2\p@ \@minus 2\p@}%%%15FEBSHE%%%

% Space above and below an inline figure
\setlength\intextsep   {18\p@ \@plus 2\p@ \@minus 2\p@}

% For double column floats
\setlength\dblfloatsep    {18\p@ \@plus 2\p@ \@minus 2\p@}
\setlength\dbltextfloatsep{18\p@ \@plus 2\p@ \@minus 2\p@}

\hyphenation{Figure Figures Table Tables Equation Equations Section Sections Appendix Theorem Lemma}
\hyphenation{Claim Conjecture Property Remark Problem Example Definition Algorithm Assumption Axiom Case Hypotheses Note Proof}

%%%% Space left at top, bottom and inbetween floats on a float page.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% PENALTY SETTING DEFINITIONS Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% META INFO DEFINITIONS Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\renewcommand\contentsname{Contents}
\renewcommand\listfigurename{List of Figures}
\renewcommand\listtablename{List of Tables}
\renewcommand\refname{\ifpurexml\XML@refname\else {References}\fi}
\renewcommand\indexname{Index}
\renewcommand\figurename{\textbf{Figure}}%%LN
\renewcommand\tablename{\textbf{Table}} %%LN
\renewcommand\partname{Part}
\renewcommand\appendixname{Appendix}
\renewcommand\abstractname{Abstract}

\def\@jname{Environmental Microbiology}
 \def\journalvolume{00}
\def\@jissue{xx}
\def\@jyear{\volyear} %%%check and update
\def\@jmonth{xx}
\def\@jpublogo{}
\def\@jpubsubmsnlogo{}%
\def\@journallogo{}
\def\@jurl{}
\def\@DOI{}
\gdef\@doinumber{}
%
\def\jidname{}
\def\volyear{}
\def\LASTyr{}
\def\artid#1{\gdef\@artid{#1}}
\def\jvol#1{#1}%
\def\jissue#1{\gdef\@jissue{#1}}
\def\jyear#1{\gdef\@jyear{#1}}
\def\jmonth#1{\gdef\@jmonth{#1}}
\def\jurl#1{\gdef\@jurl{#1}}
\def\jlogo#1{\gdef\@journallogo{#1}}%
\def\sponsorlogo#1{\gdef\@sponsorlogo{#1}}\sponsorlogo{}%

\def\@doi{}
\def\@Howdoi{}%
\def\doi#1{\gdef\@doi{#1}}%

\gdef\@published{}%
\newif\ifpublished%
\publishedfalse%

\gdef\published#1{\publishedtrue\gdef\@published{#1}}%

%%%publised definitions%%%
\def\pubinfo{\ifpublished\@published\else\@jyear\fi}%

%% Macro to split Digits %%
\newcommand\split@macro[1]{\split@macro@def[#1]}
\newcount\splitmacrocount\splitmacrocount=0\relax
\def\split@macro@def[#1#2]{%
  \advance\splitmacrocount by 1\relax\ifnum\splitmacrocount=1\relax\else\quad\vrule\quad\fi#1%
  \if\relax\detokenize{#2}\relax%
  \else\space\split@macro@def[#2]\fi\splitmacrocount=0\relax%
}
%%
\def\jnlname{}%
\def\@jcopy{Copyright $\copyright$ \@jyear\ John Wiley \& Sons, Ltd.}
\def\jcopy#1{\gdef\@jcopy{#1}}
\def\@copyrightname{\@jcopy}
\def\copyrightname#1{\gdef\@copyrightname{#1}}
\def\jtitle#1{%
  %%\gdef\@jtitle{\expandafter\threedigits#1\relax}%
  \gdef\@jtitle{#1}%
  \gdef\j@title{\lowercase{#1}}%
}\jtitle{\jnl@split@prefix}
\def\dispatch#1{\gdef\@dispatch{#1}}\dispatch{00.00.00}
\def\nop{{\pageref*{LastPage}}}
\def\jid#1{%
  \gdef\@jid{\split@macro{#1}}%
}\jid{950}
\def\fourdigits#1#2#3#4\relax{#1\quad\vrule\quad#2\quad\vrule\quad#3\quad\vrule\quad\ifthenelse{\isempty{#4}}{\hspace*{8\p@}}{#4}}
\def\threedigits#1#2#3\relax{#1\quad\vrule\quad#2\quad\vrule\quad\ifthenelse{\isempty{#3}}{\hspace*{8\p@}}{#3}}
\def\copyeditor#1{\gdef\@copyeditor{#1}}\copyeditor{}
\def\endpage#1{\gdef\@endpage{#1}}\def\@endpage{}
\def\startpage#1{\xdef\@startpage{#1}\setcounter{page}{#1}}\def\@startpage{}%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% META INFO DEFINITIONS Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% Article Title
%\def\title#1{\gdef\@title{#1}}

\renewcommand{\title}[2][]{%
\gdef\@checktitle{#1}%
\ifx\@checktitle\empty\gdef\@title{{{#2}}}%
\gdef\s@title{#2}%
\else%
\gdef\@title{#2}\gdef\s@title{#1}\fi}

% Cross Link for Author & Address
\def\jmkLabel#1{\@bsphack\protected@write\@auxout{}{\string\Newlabel{#1}{\@currentlabel}}\@esphack}
\def\Newlabel#1#2{\expandafter\xdef\csname X@#1\endcsname{#2}}
\def\jmkRef#1{\@ifundefined{X@#1}{0}{\csname X@#1\endcsname}}

%% Article Author(s)
\let\sep\@empty%
\let\authorsep\@empty%
\newcount\aucount%
\newcount\punctcount%
\gdef\@authorfootnotes{}%
\newif\ifauthfoot%
\authfootfalse%
\let\oldfootnote\footnote%

\newcommand{\authfootnote}[1]{\begingroup\gdef\@authorfootnotes{#1}\endgroup}%
\def\author{\advance\aucount by 1%
\let\footnote\authfootnote%
\@ifstar\@@corrauthor\@@author}%
\newcount\commacnt
\def\au@and{\ifnum\punctcount=1\else\ifnum\punctcount=2\ and\advance\punctcount by -1\else\ifnum\punctcount=\aucount\else, \fi\fi\fi}%
\def\artauthors{}
\def\howartauthors{}
\def\LA@putorcid{}%%%10thJuly
\def\LAputorcid{}
\newif\if@auemail%

\def\affilmarkfont{\fontencoding{TS1}\fontfamily{\rmdefault}\fontseries{b}\selectfont}%
\def\affiltextdagger{{\affilmarkfont\char132}}
\def\fdagger{{\affilmarkfont\char132}}%
\def\fddagger{{\affilmarkfont\char133}}%
\def\fsect{{\affilmarkfont\char167}}%
\def\fpara{{\affilmarkfont\char182}}%
\def\fvert{{\affilmarkfont\char134}}%

\def\affilmarkdefns{%
\let\dagger\fdagger%
\let\ddagger\fddagger%
\let\mathsection\fsect%
\let\mathparagraph\fpara%
}%

\let\authfootnote\footnote%

\newbox\authmarkbox

\def\gncolor@val{\ifNewAuthColor\special{color push cmyk 0 .8 1 0}\else\special{color push cmyk 0.75 0.05 1 0}\fi}%
\def\fnmcolor@val{\ifNewAuthColor\special{color push cmyk 1 .5 0 0}\else\special{color push cmyk 0.15 1 1 0}\fi}%
%
\def\gncolor@name{\ifNewAuthColor{blue}\else{red}\fi}%
\def\fnmcolor@name{\ifNewAuthColor{vermilion}\else{green}\fi}%
%
\def\gncolorval#1{\if@proofon\bgroup\gncolor@val#1\special{color pop}\egroup\else#1\fi}%
\def\fnmcolorval#1{\if@proofon\bgroup\fnmcolor@val#1\special{color pop}\egroup\else#1\fi}%
%%

\newbox\opnfootnotebox

\definecolor{urlBlue}{cmyk}{1,1,0.0,0.0}%

\let\oldhref\href

\newcommand{\newhref}[2]{%
\ifIssue\relax\definecolor{urlBlue}{cmyk}{0,0,0,1}\fi%
\space\oldhref{#1}{#2}\space\color{urlBlue}\url{#1}}%

\newcount\Orcidoutputtextcnt%
\Orcidoutputtextcnt=0%

\newcount\noneedaffcount%
\noneedaffcount=0%

\newcount\diffauthcnt%
\diffauthcnt=1%

\newcount\HTCcnt%%19Mar18_PSK%%
\newcount\putorcidfound\global\putorcidfound=0\relax%%%%10thJuly

\gdef\orcid#1{}%

\newcounter{authnumcnt}

\def\@filtername#1#2\@nil{#1.\ }%
\def\filtername#1 #2\@nil{%
\@filtername#1\@nil #2}%
\newcommand{\@@author}[2][]{%
\def\authfnm##1{\fnmcolorval{##1}}%
\def\authsur##1{\gncolorval{##1}}%
\let\fnm\authfnm%
\let\sur\authsur%
\def\temp{#1}%
\setcounter{authnumcnt}{0}
\g@addto@macro\artauthors{\stepcounter{authnumcnt}%
\def\footnotemark##1{%
\global\setbox\authmarkbox\hbox{\affilmarkdefns\fontsize{10bp}{0}\selectfont{##1}}}%
   \ifnum\aucount=1%
    \global\@auemailtrue%
    \else%
    \global\@auemailfalse%
    \fi%
    \def\baselinestretch{1}%
\ifnum\value{authnumcnt}=\aucount\ \ifx\temp\undefined\else\fi and #2\else\authorsep{{#2}%
}\ifx\temp\undefined\else\fi\fi\unskip\ifx\temp\@empty%
      \@ifundefined{Xname@0}%
        {\expandafter\xdef\csname Xname@0\endcsname{\filtername#2\@nil}}%
        {\expandafter\protected@xdef\csname Xname@0\endcsname%
             {\csname Xname@0\endcsname,\ \filtername#2\@nil}%#3
}%
   \else%
\ifx\temp\undefined\else{\textsuperscript{\rlap{#1}}}\fi
\fi%
    \ifx\@authorfootnotes\@empty\else{\textsuperscript{\affiltextdagger}}\def\affiltextdagger{}\fi%
    \gdef\authorsep{\au@and}%%% 
    \global\let\sep\@empty\global\let\@corref\@empty%
}
}%

\newcount\HTC@a@cnt%%19Mar18_PSK%%

\newcommand{\@@corrauthor}[3][]{%
\def\authfnm##1{\fnmcolorval{##1}}%
\def\authsur##1{\gncolorval{##1}}%
\let\fnm\authfnm%
\let\sur\authsur%
\def\temp{#1}%
\g@addto@macro\artauthors{
\def\footnotemark##1{%
\global\setbox\authmarkbox\hbox{\affilmarkdefns\fontsize{10bp}{0}\selectfont{##1}}}%
    \global\@auemailtrue%
    \def\baselinestretch{1}%
\authorsep{{#2}}
\unskip\ifx\temp\@empty%
    \textsuperscript{\smash{{*}}}%
      \@ifundefined{Xname@corres}%
        {\expandafter\xdef\csname Xname@corres\endcsname{\filtername#2\@nil}%#3
}%
        {\expandafter\protected@xdef\csname Xname@corres\endcsname%
             {\csname Xname@corres\endcsname,\ \filtername#2\@nil}}%
      \@ifundefined{Xname@0}%
        {\expandafter\xdef\csname Xname@0\endcsname{\filtername#2\@nil}}%
        {\expandafter\protected@xdef\csname Xname@0\endcsname%
             {\csname Xname@0\endcsname,\ \filtername#2\@nil}}%
    \else
\ifnum\noneedaffcount=1\relax\else%
    \textsuperscript{\smash{{%
      \@for\@@affmark:=#1\do{\edef\affnum{\@ifundefined{X@\@@affmark}{1}{\jmkRef{\@@affmark}}}%
      \@ifundefined{Xname@\@@affmark}%
        {\expandafter\xdef\csname Xname@\@@affmark\endcsname{\filtername#2\@nil}}%
        {\expandafter\protected@xdef\csname Xname@\@@affmark\endcsname%
             {\csname Xname@\@@affmark\endcsname,\ \filtername#2\@nil}}%
      \@ifundefined{Xname@corres}%
        {\expandafter\xdef\csname Xname@corres\endcsname{\filtername#2\@nil}}%
        {}%
     \unskip\sep\ifnum\addcount=1\else\affnum\fi\let\sep=,}\raisebox{-5pt}{\fontsize{15bp}{0bp}\selectfont{*}}}}\unhbox\authmarkbox}\fi%#3
\fi%
\ifx\@authorfootnotes\@empty\else{\textsuperscript{\affiltextdagger}}\def\affiltextdagger{}\fi%
    \def\authorsep{\au@and}%%% 
    \global\let\sep\@empty\global\let\@corref\@empty%
}%
}%
%

%% Author Email
\newif\ifcorrauth
\def\addressrule{\kern-10\p@ \hrule \@height.0pt \@width\marginparwidth \kern 1.6\p@}%
\def\@email{}
\DeclareUrlCommand\myemail{}%

\def\email#1{\gdef\@email{\ifpurexml\else Email:\ \fi#1}}%
\def\tel#1{\gdef\@tel{#1}}\tel{}%
\def\fax#1{\gdef\@fax{#1}}\fax{}%

% Introduced 

\let\nomail\relax

\newif\ifdeceased
\newif\ifequalcont
\newif\ifauthfootpresent%
\def\deceased{\undefined\g@addto@macro\artauthors{{\^{}}}\global\deceasedtrue}%
\newcommand{\equalcont}[1][Contributed equally]{\undefined\gdef\@equalconttext{#1}\g@addto@macro\artauthors{\textsuperscript{\affilmarkdagger}\if@auemail\textsuperscript{*}\fi}\global\equalconttrue}%

%% Corrseponding Address 
\def\@copycorthanks{}
\def\movedauaddress{}
\newcounter{affn}

\newdimen\affboxdim%
\newbox\affbox%

\renewcommand\theaffn{\arabic{affn}}%
\def\address{\@ifstar\@@coraddress\@@address}
\newcount\addcount% To check the count of address
\def\auaddress{}
\newcommand{\@@coraddress}[2][]{%
\setbox\affbox=\hbox{\addressfont#1}%
\affboxdim=\wd\affbox%%\showthe\affboxdim%
\def\temps{#1}\advance\addcount by 1%
\ifx\temps\@empty%
\g@addto@macro\movedauaddress{%
     \protected@xdef\@movedauaddress{\ifx\@movedauaddress\empty\else\@movedauaddress\par\fi{%
        \par\vskip\baselineskip%
        \@ifundefined{Xname@0}%
           {}%
           {\csname Xname@0\endcsname}%
           #2}}}%
\else
\g@addto@macro\movedauaddress{%
     \stepcounter{affn}%
     \xdef\@currentlabel{\theaffn}%
     \jmkLabel{\theaffn}%
     \protected@xdef\@movedauaddress{%\leftskip-.8pt%
     \ifx\@movedauaddress\empty\else\@movedauaddress\par\fi{%
        \par\vskip\baselineskip%
                {\ifnum\addcount=1\else\leavevmode\llap{\hbox to \affboxdim{#1\hss}}\fi}%
        \@ifundefined{Xname@\theaffn}%
           {}%
           {}%
           #2}}}%
\fi
\g@addto@macro\auaddress{\leftskip2pt%
{\leavevmode\llap{\hbox to 7pt{\upshape*\hss}}%
\hspace*{-1pt}\parbox[t]{20pc}{Correspondence to:\ %
\@corres\ifx\@email\@empty\else.\ \@email\fi}}}}

%Abbreviation Used

\newif\ifabbr%
\abbrfalse%

%Abbreviations used:
\def\abbr#1{\abbrtrue%
\gdef\@abbr{\textbf{Abbreviations used:}\ #1}}%
\gdef\@abbr{}%

%present address
\newif\ifpresentadd%
\presentaddfalse%

\gdef\@presentadd{}%
\def\presentadd#1{\presentaddtrue\gdef\@presentadd{%
\leftskip\affboxdim\leavevmode\llap{\hbox to \affboxdim{\ddag\hss}}%
{Present address:\ #1}}}%

\newif\ifthanks\global\thanksfalse%

\gdef\@thanks{}%
\def\thanks#1{\thankstrue\gdef\@thanks{%
\leftskip\affboxdim\leavevmode\llap{\hbox to \affboxdim{\dag\hss}}%
{#1}}}%

\def\addressNUMbox#1{\hbox to 8pt{#1\hss}}

\def\corresastflag#1{\gdef\@corresastflag{#1}}\corresastflag{\protect\raisebox{-2pt}{*}}

\gdef\@corres{}%
\def\corres#1{\gdef\@corres{\baselineskip9pt%
\parindent=0pt%
{\reset@font\corresfont%\@corresastflag_Request_ID_153670_gamm_201800006%%%%
\@history@dates
\ifx\@jcode\@@@JTSA%
 % \textbf{Correspondence}\hb#1\par%
  \else%
\ifx\@jcode\@@@QJ%
 % \textbf{Correspondence}\hb#1\par%
  \else%
\ifx\@jcode\@@@GAMM% 
%  \textbf{Correspondence}\hb#1\par%
  \else%
*For correspondece. \ifx\@email\@empty\else\@email\ifx\@tel\@empty.\else;\fi\space\fi%
\ifx\@tel\@empty\else Tel~\@tel;\space\fi%
\ifx\@fax\@empty\else Fax~\@fax.\space\fi#1 Present Address:\space%
\fi\fi\fi%
}}}%

\def\corradd{\@thanks%
    \ifnum\addcount>0%  
        %\marginpar{\addressfont Full list of author information is available at the end of the article\par}%
    \fi}%

\def\received#1{\gdef\@received{Received #1}}\gdef\@received{}%
\def\myaddress{\gdef\@orgdiv}

%% Author Address 
\def\addsep{\par\vskip0pt}
\def\moveaddsep{\par\vskip7.6pt}
\def\@movedauaddress{}%
\newcount\addcount% To check the count of address
\newcommand{\@@address}[2][]{%
\setbox\affbox=\hbox{\addressfont#1}%
\affboxdim=\wd\affbox%%\showthe\affboxdim%
\advance\addcount by 1\g@addto@macro\movedauaddress{\vspace*{0pt}%%%15FEBSHE%%%
\addressfont\baselineskip=9pt%
     \stepcounter{affn}%
     \xdef\@currentlabel{\theaffn}%
     \jmkLabel{\theaffn}%
     \protected@xdef\@movedauaddress{%\leftskip=\affboxdim%\leftskip9pt%
     \ifx\@movedauaddress\empty\else\@movedauaddress\par\fi{%
        \par\nointerlineskip\moveaddsep%\baselineskip%
                {\ifnum\addcount=1\else\leavevmode{\textsuperscript{{\rm#1\hss}}}\fi}%
        \@ifundefined{Xname@\theaffn}%
           {}%
           {}%
           #2\par}}}}%

%% Address tagging 
\newcommand{\orgdiv}[1]{#1}%
\newcommand{\orgname}[1]{#1}%
\newcommand{\orgaddress}[1]{#1}%
\newcommand{\street}[1]{#1}
\newcommand{\postcode}[1]{#1}
\newcommand{\city}[1]{#1}
\newcommand{\state}[1]{#1}
\newcommand{\country}[1]{#1}

%% Author name in Running Head

\newcount\lastauthorcnt

\newif\if@suppimage \global\@suppimagefalse

%\def\abstractsection#1{\vskip12pt\noindent{\bfseries#1:\enspace}}

\def\abstractsection#1{%
{\absheadfont#1}\par%
\vspace*{-0.1pt}%
}%

%% Article Abstract
\newcommand{\abssection}{\@ifstar{\@abssection}{\@@abssection}}%
\newcommand\@abssection[1]{{\par\textbf{#1:}\ }}%
\newcommand\@@abssection[1]{{\par\textbf{#1:}\ }}%

\newif\ifAbsSectionexists%
\AbsSectionexistsfalse%

\def\abskeyraggedright{\leftskip=29pt\rightskip=29pt\parfillskip=0pt plus 1fil\relax}%
\def\authorraggedright{\leftskip=12pt\rightskip=12pt\parfillskip=0pt plus 1fil\relax}%

\renewcommand\abstract[2][]{%
  \gdef\@abstract{%
    \setlength{\parindent}{\z@}%
    \abskeyraggedright%
    {#2\par\vspace*{0\p@}}%
    \addcontentsline{toc}{section}{\abstractname}%
\nobreak}}%\abstract{}%

%% Correspondence
\def\correspondencename{\textbf{Correspondence}}
\def\correspondence#1{%
  \gdef\@correspondence{%
    \par\vspace*{3\p@}%
{\corresfont#1\par}}%
}\correspondence{}%

\newif\ifnofnumber%

\def\fundcomma{,}

%% Funding Information
\def\fundingNumber#1{#1.}%
\def\fundingAgency#1{#1\ifnofnumber.\else\fundcomma\fi\space}%
%
\newcount\fundinginfocount\fundinginfocount0%
\newcount\commafundinginfocount\commafundinginfocount0%
\newcount\fundinginfotempcount\fundinginfotempcount0%
\newcount\tempfundinginfocount\tempfundinginfocount0%
%
\def\fundingInfo#1{%
  \expandafter\protected@xdef\csname fundinginfo\the\fundinginfocount\endcsname{#1}%
  \global\advance\fundinginfocount1%
}%
%
\def\fundinginfohead#1{\gdef\@fundinginfo@head{#1}}\fundinginfohead{%
    \textbf{Funding information}%
}%
\def\fundinginfoheadtext#1{\gdef\@fundinginfo@head@text{#1}}\fundinginfoheadtext{This research was supported by the\space}%
\gdef\@fundinginfo{{%
  \reset@font\FIfont%
  \ifnum\fundinginfocount<1\else%
  \par\vspace*{3\p@}%
  \@fundinginfo@head\par%
  \@fundinginfo@head@text%
  \global\tempfundinginfocount\fundinginfocount%
  \global\advance\tempfundinginfocount-1%
  \global\commafundinginfocount\tempfundinginfocount%
  \global\advance\commafundinginfocount-1%
  \ifnum\fundinginfocount=1%
    \ignorespaces\csname fundinginfo0\endcsname%
  \else%
    \@whilenum\fundinginfotempcount<\tempfundinginfocount\do{%
      \ignorespaces\csname fundinginfo\the\fundinginfotempcount\endcsname\ %
      \global\advance\fundinginfotempcount1%
    }%
    \csname fundinginfo\the\fundinginfotempcount\endcsname\par%
  \fi%
  \fi%
\par}}%

\def\fundagendot{;}%
\newif\ifFundInfoExist%
\def\finfo#1{\FundInfoExisttrue%
  \def\fundingAgency##1{##1\fundagendot}%
  \def\fundingNumber##1{##1}%
  \def\fundingOrgname##1{\unskip}%
  \def\fundingDOI##1{\unskip}%
  \def\@fundinginfo{#1}%
}\finfo{}%

%% JEL Classification
\newcount\JELinfocount\JELinfocount0%
\newcount\commaJELinfocount\commaJELinfocount0%
\newcount\JELinfotempcount\JELinfotempcount0%
\newcount\tempJELinfocount\tempJELinfocount0%
%
\def\JELinfo#1{%
  %% \expandafter\protected@xdef\csname JELinfo\the\JELinfocount\endcsname{#1}%
  %% \global\advance\JELinfocount1%
}%
%
\def\JELinfohead#1{\gdef\@JELinfo@head{#1}}\JELinfohead{\textit{JEL codes:\space}}%NEWNJD%%%15FEBSHE%%%
\gdef\@JELinfo{{%
  \ifnum\JELinfocount<1\else%
  \reset@font\JELfont\abskeyraggedright%\raggedright%NEWNJD
  \par\vspace*{11\p@}%%%15FEBSHE%%%
  \@JELinfo@head%NEWNJD
  \global\tempJELinfocount\JELinfocount%
  \global\advance\tempJELinfocount-1%
  \global\commaJELinfocount\tempJELinfocount%
  \global\advance\commaJELinfocount-1%
  \ifnum\JELinfocount=1%
    \ignorespaces\csname JELinfo0\endcsname\par%
  \else%
    \@whilenum\JELinfotempcount<\tempJELinfocount\do{%
      \ignorespaces\csname JELinfo\the\JELinfotempcount\endcsname\par %
      \global\advance\JELinfotempcount1%
    }%
    \csname JELinfo\the\JELinfotempcount\endcsname\par\vspace*{-\baselineskip}%
  \fi%
  \fi%
}}%

%%%MOS Classification%%
\newcount\MOSinfocount\MOSinfocount0%
\newcount\commaMOSinfocount\commaMOSinfocount0%
\newcount\MOSinfotempcount\MOSinfotempcount0%
\newcount\tempMOSinfocount\tempMOSinfocount0%
%
\def\MOSinfo#1{%
  \expandafter\protected@xdef\csname MOSinfo\the\MOSinfocount\endcsname{#1}%
  \global\advance\MOSinfocount1%
}%
%
\def\MOSinfohead#1{\gdef\@MOSinfo@head{#1}}\MOSinfohead{\textbf{\letterspacetwty{MOS SUBJECT CLASSIFICATION}}\nobreakspace{}}%%%15FEBSHE%%%
\gdef\@MOSinfo{{%
  \ifnum\MOSinfocount<1\else%
  \reset@font\JELfont%\raggedright%NEWNJD
  \par\vspace*{11\p@}%15FEBSHE
  \@MOSinfo@head\par%NEWNJD
  \global\tempMOSinfocount\MOSinfocount%
  \global\advance\tempMOSinfocount-1%
  \global\commaMOSinfocount\tempMOSinfocount%
  \global\advance\commaMOSinfocount-1%
  \ifnum\MOSinfocount=1%
    \ignorespaces\csname MOSinfo0\endcsname\par%
  \else%
    \@whilenum\MOSinfotempcount<\tempMOSinfocount\do{%
      \ignorespaces\csname MOSinfo\the\MOSinfotempcount\endcsname\par %
      \global\advance\MOSinfotempcount1%
    }%
    \csname MOSinfo\the\MOSinfotempcount\endcsname\par\vspace*{-\baselineskip}%
  \fi%
  \fi%
}}%

%%
\newbox\htftbox%
\newdimen\ovsize%
\newdimen\oovsize%
\newdimen\FreePageSpace%
\newdimen\FreePageSpaceTest%
\newskip\fadjskip\fadjskip=0pt%
\newskip\adjustskip\adjustskip=0pc%
\newskip\titleskip%

\gdef\ComputeFreeSpaceOnPage{%
\par%
\ifdim\pagetotal=0pt%
   \global\FreePageSpace=\vsize%
   \global\advance\FreePageSpace by -\adjustskip%
\else%
   \FreePageSpace=\pagegoal%
  \ifvoid\footins%
     \global\advance\FreePageSpace by -\pagetotal%
     \global\advance\FreePageSpace by -\adjustskip%
  \else%
    \setbox3=\vbox{\unvbox\footins}%
    \htftbox=\ht3%
    \advance\htftbox by \dp3%
    \global\advance\FreePageSpace by -\pagetotal%
    \global\advance\FreePageSpace by -\htftbox%
    \global\advance\FreePageSpace by -\adjustskip%
  \fi%
\fi%
}%

\definecolor{tenpercent}{cmyk}{0,0,0,0.10}
\definecolor{thirtyfivepercent}{cmyk}{0,0,0,0.35}
\definecolor{sixtyfivepercent}{cmyk}{0,0,0,0.65}
\definecolor{seventyfivepercent}{cmyk}{0,0,0,0.75}
\definecolor{eightpercent}{cmyk}{0,0,0,0.8}%

%
\newskip\abs@coli@hsize\abs@coli@hsize12pc%
\newskip\abs@colii@hsize\abs@colii@hsize80mm%
%
\newbox\abs@boxa%
\newbox\abs@boxb%
\newbox\abs@boxc%
%
\newdimen\abs@dima%
\newdimen\abs@dimb%
\newdimen\abs@dimc%
%
\def\absCOvrule{\vrule width0.5pt}%
\def\authCOvrule{{\color{tenpercent}\vrule width\abs@colii@hsize}}%
\def\NullauthCOvrule{{\color{white}\vrule width\abs@colii@hsize}}%
%
\long\def\absworkarea#1#2{%
  \setbox\abs@boxa\vbox{\hsize\abs@coli@hsize#1\dummyalphabet}%
  \abs@dima=\ht\abs@boxa%
  \advance\abs@dima by \dp\abs@boxa%
  \advance\abs@dima by -4.5\p@%
  \setbox\abs@boxb\vbox{\hsize\abs@colii@hsize#2\dummyalphabet}%
  \abs@dimb=\ht\abs@boxb%
  \advance\abs@dimb by \dp\abs@boxb%
  \ComputeFreeSpaceOnPage%
\if@TwoColLayout\stripsep\z@\fi%
  \ifdim\abs@dimb>\FreePageSpace%
    \setbox8=\vbox{\unvbox\abs@boxb}%
    \advance\FreePageSpace by -\@firstpage@foot@height%
    \setbox1=\vsplit8 to \FreePageSpace%
    \setbox1=\vbox{\unvbox1}%
    \setbox2=\vbox{\unvbox8}%
    \ifdim\abs@dima>\FreePageSpace%
      \setbox7=\vbox{\unvbox\abs@boxa}%
      \setbox3=\vsplit7 to \FreePageSpace%
      \setbox3=\vbox{\unvbox3}%
      \setbox4=\vbox{\unvbox7}%
    \fi%
    \gdef\abs@dimchk{\ifdim\ht3>\ht1\ht3\else\ht1\fi}%
    \if@TwoColLayout\begin{strip}\else\vbox{\fi%
      \begin{minipage}[t]{\abs@coli@hsize}%
      \leavevmode\vbox to \abs@dimchk{\ifdim\abs@dima>\FreePageSpace\copy3\else\unvbox\abs@boxa\fi\vfill}%
      \end{minipage}\hfill%
      \hspace*{7\p@}\absCOvrule\hspace*{7\p@}\authCOvrule%
      \begin{minipage}[t]{\abs@colii@hsize}%
      \leavevmode\hspace*{-\textwidth}\vbox to \abs@dimchk{\unvbox1\vfill}%
      \end{minipage}%
      \vspace*{\@firstpage@foot@height}%
    \if@TwoColLayout\end{strip}\else}\fi%
    \vfill\eject%
    \loop%
    \ifdim\ht2>\textheight%
    \ovsize=\vsize%
    \setbox1=\vsplit2 to \ovsize%
    \setbox1=\vbox{\unvbox1}%
    \setbox3=\vsplit4 to \ovsize%
    \setbox3=\vbox{\unvbox3}%
    \if@TwoColLayout\begin{strip}\else\vbox{\fi%
      \begin{minipage}[t]{\abs@coli@hsize}%
      \leavevmode\vbox{\unvbox3\vfill}%
      \end{minipage}\hfill%
      \hspace*{7\p@}\absCOvrule\hspace*{7\p@}\authCOvrule%
      \begin{minipage}[t]{\abs@colii@hsize}%
      \leavevmode\hspace*{-\textwidth}\vbox{\vspace*{7\p@}\unvbox1\vspace*{7\p@}}%
      \end{minipage}%
    \if@TwoColLayout\end{strip}\else}\fi%
    \clearpage%
    \repeat%
    \gdef\abs@dimchk{\ifdim\ht4>\ht2\ht4\else\ht2\fi}%
    \if@TwoColLayout\begin{strip}\else\vbox{\fi%
      \begin{minipage}[t]{\abs@coli@hsize}%
      \leavevmode\vbox to \abs@dimchk{\copy4\vfill}%
      \end{minipage}
      \hfill%
      \hspace*{7\p@}\absCOvrule\hspace*{7\p@}\authCOvrule%
      \begin{minipage}[t]{\abs@colii@hsize}%
      \leavevmode\hspace*{-\textwidth}\vbox to \abs@dimchk{\unvbox2\vfill}%
      \end{minipage}%
      \vspace*{2pc}%
      \vskip\titleskip%
    \if@TwoColLayout\end{strip}\else}\fi%
  \else%
    \ifdim\abs@dima>\FreePageSpace%
      \setbox8=\vbox{\unvbox\abs@boxa}%
      \advance\FreePageSpace by -\@firstpage@foot@height%
      \setbox1=\vsplit8 to \FreePageSpace%
      \setbox1=\vbox{\unvbox1}%
      \setbox2=\vbox{\unvbox8}%
      \if@TwoColLayout\begin{strip}\else\vbox{\fi%
        \begin{minipage}[t]{\abs@coli@hsize}%
        \leavevmode\vbox{\copy1\vfill}%
        \end{minipage}\hfill%
        \hspace*{7\p@}\absCOvrule\hspace*{7\p@}\authCOvrule%
        \begin{minipage}[t]{\abs@colii@hsize}%
        \leavevmode\hspace*{-\textwidth}\vbox to \ht1{\unvbox\abs@boxb\vfill}%
        \end{minipage}%
        \vspace*{\@firstpage@foot@height}%
      \if@TwoColLayout\end{strip}\else}\fi%
      \vfill\eject%
      \loop\ifdim\ht2>\textheight%
      \ovsize=\vsize%
      \setbox1=\vsplit2 to \ovsize%
      \setbox1=\vbox{\unvbox1}%
      \if@TwoColLayout\begin{strip}\else\vbox{\fi%
        \begin{minipage}[t]{\abs@coli@hsize}%
        \leavevmode\vbox{\unvbox1\vfill}%
        \end{minipage}\hfill%
        \hspace*{7\p@}\absCOvrule\hspace*{7\p@}\authCOvrule%
        \begin{minipage}[t]{\abs@colii@hsize}%
        \leavevmode\hspace*{-\textwidth}\vbox{\vspace*{7\p@}\unvbox1\vspace*{7\p@}}%
        \end{minipage}%
      \if@TwoColLayout\end{strip}\else}\fi%
      \clearpage%
      \repeat%
      \if@TwoColLayout\begin{strip}\else\vbox{\fi%
        \begin{minipage}[t]{\abs@coli@hsize}%
        \leavevmode\vbox{\unvbox2\vfill}%
        \end{minipage}
        \hfill%
        \hspace*{7\p@}\absCOvrule\hspace*{7\p@}\let\authCOvrule\NullauthCOvrule%
        \begin{minipage}[t]{\abs@colii@hsize}%
        \leavevmode\hspace*{-\textwidth}\vbox{\vspace*{7\p@}\unvbox2\vspace*{-7\p@}}%
        \end{minipage}%
        \vspace*{2pc}%
        \vskip\titleskip%
      \if@TwoColLayout\end{strip}\else}\fi%
    \else%
      \gdef\abs@dimchk{\ifdim\abs@dima>\abs@dimb\abs@dima\else\abs@dimb\fi}%
      \if@TwoColLayout\begin{strip}\else\vbox{\fi%
        {\copy\abs@boxa}\par%
        {\unvbox\abs@boxb}%
        \vspace*{2pc}%
        \vskip\titleskip%
      \if@TwoColLayout\end{strip}\else}\fi%
    \fi%
  \fi%
\global\thankstrue%
  \bgroup%
    \def\labeltext##1{$^\mathrm{\text{##1}}$}%
    \def\@makefnmark{}%
    \def\@makefnmark{\hbox{\@textsuperscript{\normalfont\@thefnmark}}}%
  \egroup%
}%

%%
\def\GnSabsfoot#1{{\GnSabsfootfont\textcolor{lightgray}{#1}}}%
\gdef\@GnSabshead{%
  \onecolumn%
  \addtocounter{page}{-1}%
  \parindent=\z@%
  \thispagestyle{empty}%
  \setlength{\topsep}{12\p@}%
  \strut\par\vspace*{-\baselineskip}%
  \vspace*{-5\p@}%
  \print@articletype%
  \let\refdefns\relax%
  {\titlefont\@maintitle\par}%
  \let\afflinks\Aafflinks%
  \knockoff@color@in@author%
  \vspace*{\baselineskip}%
  \vspace*{4\p@}%
  {\authorfont\Authorinfo\par}%
  \vspace*{\baselineskip}%
  \vspace*{2\p@}%
}%
%

%% Short Abstract
\newif\if@shrtabstract%
%
\def\@shortabstract{}%
%
\def\STOC{\GnSabsfoot{Wiley Online Library Short Abstract}}%
%
\long\def\shortabstract#1{%
  \gdef\@shortabstract{%
    \@shrtabstracttrue%
    \@GnSabshead%
    {\GnSabsfont#1\par}%
    \vfill%
    \STOC\par%
  }%
}%\shortabstract{}%

%% Graphical Abstract
\newif\if@graphabstract%
%
\def\@graphicalabstract{}%

\def\GTOC{\GnSabsfoot{Wiley Online Library Graphical TOC}}%
%
% \long\def\graphicalabstract#1{%
%   \gdef\@graphicalabstract{{%
%     \@graphabstracttrue%
%     \@GnSabshead%
%     {\GnSabsfont#1\par}%
%     \vfill%
%     \GTOC\par%
%   }}%
% }%\graphicalabstract{}%


\newif\ifGAabsincluded%
\global\GAabsincludedfalse%

\newbox\widthbox%
\newbox\heightbox%

%% Keywords
\def\keywordname{\textit{Key words:}}%
\def\keywords#1{%
  \ifx#1\empty\else%
  \gdef\@keywords{\leftskip12pt\rightskip\leftskip%
    \par\vspace*{16.07\p@}%
    {\abskeyraggedright\keywordsfont\keywordname\space#1\par}%
  }%
  \fi%
}\keywords{}

%% Article History
\def\received#1{\gdef\@received{Received #1}}\gdef\@received{}%
\def\revised#1{\gdef\@revised{Revised #1}}\gdef\@revised{}%
\def\accepted#1{\gdef\@accepted{Accepted #1}}\gdef\@accepted{}%
\def\pubdate#1{\gdef\@pubdate{Published on: #1}}\gdef\@pubdate{}%

%%%%%%%%%%%%%%%%%%%%%%%%%%% Article History  %%%%%%%%%%%%%%%%%%%%
%
\def\history{{\par\addvspace{9pt}%
\historyfont\noindent\ifx\@received\empty\else\@received\fi%
\ifx\@revised\empty\else\hskip.5em\@revised\fi%
\ifx\@accepted\empty\else\hskip.5em\@accepted\fi%
%\ifx\@published\empty\else\hskip.5em\@published\fi%
\par}}%
%

\def\onlineinfo{Published online in Wiley Online Library\ifx\@pubdate\empty\else:\space\@pubdate\fi}%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Other Categories Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\newbox\pubhead@boxa
\newdimen\pubhead@dima
\newenvironment{pubhead}{%
  \ifcategoryone\bigskip\else\ifcategorytwo\vspace*{22\p@}\else\fi\fi%
  \bgroup%
    \pubheadfont\noindent\ignorespaces\ignorespaces%
}{%
    \ifcategoryone\else\ifcategorytwo\vspace*{11\p@}\else\fi\fi%
    \ignorespaces\par%
  \egroup\noindent%
}%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Other Categories Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% MAKETITLE Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Article Header Definition
\def\clearheadinfo{%
    \global\let\thanks\relax%
  \global\let\maketitle\relax%
  \global\let\@maketitle\relax%
  \global\let\@author\@empty%
  \global\let\@date\@empty%
  \global\let\title\relax%
  \global\let\author\relax%
  \global\let\date\relax%
  \global\let\and\relax
}
%
%% Printing Article Header
\newif\if@withintitle\global\@withintitlefalse
\newif\ifFootnoteNextPage\FootnoteNextPagefalse%
\newcount\cofootcnt%
%
\def\articletyperule{\smash{\hbox{\rule{\articletypedim}{\p@}}}}%
\def\printarticletype#1{%Cate_def
  \gdef\print@articletype{%
    \strut\par\vspace*{\baselineskip}%
    %\vspace*{-2\p@}%
    \vspace*{-20\p@}%NEWNJD
    \if@AC%
      {\arttypefont#1\par}%
      \vspace*{-8\p@}%
 %     \articletyperule\par%
    \else%
      {\arttypefont\vphantom{#1}\par}%
      \vspace*{-8\p@}%
%      \vphantom{\articletyperule}\par%
    \fi%
   \vspace*{\baselineskip}%
%    \vspace*{-.2\p@}%
    \vspace*{6\p@}%
  }%
}%
\printarticletype{%
 %  \ifcategoryone\vspace*{-20\p@}\else%%%Announcement%%
%   \ifcategorytwo\article@type\else%%Book Review%%
%   \ifcategorythr\else%%Commentary%%
%   \ifcategoryfou\article@type\else%%Editorial%%
%   \ifcategoryfiv\else%%Letter to the Editor%%
%   \ifcategorysix\else%%Letter to the Editor%%
%   \ifcategoryseven\else%%Letter to the Editor%%
%   \ifcategorynine\article@type\else%%Letter to the Editor%%
  \article@type%
%  \fi\fi\fi\fi\fi\fi\fi\fi%
}%
%


\renewcommand{\@maketitle}{%
\if@TwoColLayout\else%
  \fi%
\thispagestyle{titlepage}%
\label{abeginpage}%
  \parindent=0pt\print@articletype%
\ifx\@ArtType\empty\else
      {\arttypefont\@ArtType\vphantom{ygy}\par}%
\fi
  \ifx\@title\empty\else%
    {\titlefont\@title\par}%
  \fi
\removelastskip\vskip24pt%
 {\authorfont\ignorecategory{\leftskip12pt\raggedcenter\artauthors}\par}%
\removelastskip\vskip20pt%
   \ifx\@abstract\empty\else{\@abstract\par}\fi%
   \ifx\@keywords\empty\else{\@keywords\par}\fi%
   \ifx\@JELinfo\empty\else{\@JELinfo\par}\fi%
\removelastskip\vskip32pt%
 }%
%
\renewcommand\maketitle{%
  \par\newpage%
  \@afterindentfalse%
  \global\cofootcnt=0\relax%
  \begingroup%
    \global\@withintitletrue%
%    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
    %\gdef\@makefnmark{}%{\rlap{\@textsuperscript{\normalfont\smash{\@thefnmark}}}}%
    \if@twocolumn
    \if@TwoColLayout%
    \newOPSAttachList
    \fi%
      \ifnum \col@number=\@ne%
     \twocolumn[\@maketitle]%
      \else
        \twocolumn[\@maketitle]%
  %% manipulated in WB_STD-XML.sty %%
      \fi%
  \else%
      %\newpage%
      \global\@topnum\z@% Prevents figures from going at top of page.
      \@maketitle%
    \fi%
    \global\@withintitlefalse%
  \endgroup%
  \@afterheading%
  \clearheadinfo%
\ifx\@corres\@empty\else\protect\footnotetext{\@corres}\fi
    \def\@makefnmark{}%
\footnotetext{\reset@font\addressfont\baselineskip=9pt\movedauaddress\@movedauaddress}\par%
\let\footnote\oldfootnote%
\def\@makefnmark{\hbox{\@textsuperscript{\normalfont\@thefnmark}}}%
}%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% MAKETITLE Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% SECITON Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\setcounter{secnumdepth}{0}
\newcounter {chapter}[part]% for bookmarks
\renewcommand\thepart         {\@Roman\c@part}
\renewcommand\thesection      {\@arabic\c@section}
\renewcommand\thesubsection   {\thesection.\@arabic\c@subsection}
\renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection}
\renewcommand\theparagraph    {\thesubsubsection.\@arabic\c@paragraph}
\renewcommand\thesubparagraph {\theparagraph\@arabic\c@subparagraph}
%%
\renewcommand\part{\par
   \addvspace{4ex}%
   \@afterindentfalse
   \secdef\@part\@spart}
%%
\def\@part[#1]#2{%
    \ifnum \c@secnumdepth >\m@ne
      \refstepcounter{part}%
      \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
    \else
      \addcontentsline{toc}{part}{#1}%
    \fi
    {\parindent \z@ \raggedright
     \interlinepenalty \@M
     \normalfont
     \ifnum \c@secnumdepth >\m@ne
       \Large\bfseries \partname~\thepart
       \par\nobreak
     \fi
     \huge \bfseries #2%
     \markboth{}{}\par}%
    \nobreak
    \vskip 3ex
    \@afterheading}

\def\@spart#1{%
    {\parindent \z@ \raggedright
     \interlinepenalty \@M
     \normalfont
     \huge \bfseries #1\par}%
     \nobreak
     \vskip 3ex
     \@afterheading}

\renewcommand\section{\@startsection{section}{1}{\z@}%
{\ifacksec-19.85pt \@plus -2pt \@minus -.2pt\else-20pt \@plus -2pt \@minus -2pt\fi}%
{\ifacksec6.5pt\else13\p@\fi}{\sectionfont}}%
\newcommand\Appsection{\@startsection{section}{1}{\z@}{-13.2pt \@plus -2pt \@minus -2pt}{6.5\p@}{\appsectionfont}}%
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}{-20pt \@plus -2pt \@minus -2pt}{6.5\p@}{\subsectionfont}}%
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}{-10pt \@plus -2pt \@minus -2pt}{-.5em}{\subsubsectionfont}}%
\renewcommand\paragraph{\@startsection{paragraph}{4}{\parindent}{0pt}{-.5em}{\enspace\paragraphfont}}%
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\z@}{-13pt \@plus -6.5pt \@minus -3.25pt}{-1em}{\subparagraphfont}}%
%
\newskip\secruleskip%
\secruleskip15.5\p@%

\newskip\secrulebfskip%
\secrulebfskip13.8\p@%

\def\secrule{\hspace*{\secrulebfskip}\protect\raisebox{0pt}{\protect\rule{.5\p@}{10\p@}}\hspace*{\secruleskip}}%
\def\subsecrule{\secrule}%
\def\subsubsecrule{\hspace*{\secrulebfskip}\protect\raisebox{0pt}{\protect\rule{.5\p@}{10\p@}}\hspace*{\secruleskip}}%

\def\@sectioncntformat#1{{\csname the#1\endcsname\secrule}}%
\def\@subsectioncntformat#1{{\csname the#1\endcsname\subsecrule}}%
\def\@subsubsectioncntformat#1{{\csname the#1\endcsname\subsubsecrule}}%
\def\@paragraphcntformat#1{#1}
\def\@subparagraphcntformat#1{#1}
%

\newif\ifManualUppcase%
\ManualUppcasefalse%

\newif\ifAppendixsec%
\Appendixsecfalse%

\def\@sect#1#2#3#4#5#6[#7]#8{%
   \ifnum #2>\c@secnumdepth%
      \edef\@svsec{\noindent}%
   \else%
      \refstepcounter{#1}%
      \let\@@protect\protect%
      \def\protect{\noexpand\protect\noexpand}%
      \edef\@svsec{\csname @#1cntformat\endcsname{#1}}%
      \let\protect\@@protect%
   \fi%
   \@tempskipa #5\relax%
   \ifdim \@tempskipa>\z@%
      \ifnum#2=1%
         \begingroup #6\relax%\@hangfrom%
            {\noindent\hskip #3\relax{\@svsec}}%
            {\interlinepenalty\@M{\ifAppendixsec{#8}\else\ifManualUppcase{#8}\else{#8}\fi\fi}\par}%
         \endgroup%
      \else%
         \ifnum#2=2%
            \begingroup #6\relax%\@hangfrom%
               {\noindent\hskip #3\relax\@svsec}%
               {\interlinepenalty\@M{#8}\par}%
            \endgroup%
         \else%
      \ifnum#2=3%
            \begingroup #6\relax%\@hangfrom%
               {\noindent\hskip #3\relax\@svsec}%
               {\interlinepenalty\@M{#8.}\par}%
            \endgroup%
         \else%
      \ifnum#2=4%
            \begingroup #6\relax%\@hangfrom%
               {\noindent\hskip #3\relax\@svsec}%
               {\interlinepenalty\@M{\textcolor{black!75}{#8}}\par}%
            \endgroup%
         \else%
            \begingroup #6\relax%\@hangfrom
               {\noindent\hskip #3\relax\@svsec}%
               {\interlinepenalty\@M#8\par}%
            \endgroup%
         \fi%
      \fi%
     \fi%
      \fi%
      \csname #1mark\endcsname{#7}%
      \addcontentsline{toc}{#1}{%
        \ifnum #2>\c@secnumdepth \else%
          \protect\numberline{\csname the#1\endcsname}%
        \fi%
        #7}%
   \else%
      \def\@svsechd{%
         #6{\hskip #3\relax%
         \@svsec {\ifnum#2=4\textbullet\enspace\fi#8.}}%
      }%
   \fi%
   \@xsect{#5}%
}%

\def\@ssect#1#2#3#4#5#6{%
   %#1#2#3#4#5#6
   \@tempskipa #4\relax%
   \ifdim\@tempskipa>\z@%
      \ifnum#1=1%
         \begingroup%
            #5{\@hangfrom{\hskip #2}%
            \interlinepenalty \@M\ifAppendixsec{#6}\else{#6}\fi\@@par}%
         \endgroup%
         \addcontentsline{toc}{section}{#6}%
      \else%
         \begingroup%
            #5{\@hangfrom{\hskip #2}%
            \interlinepenalty \@M#6\@@par}%
         \endgroup%
      \fi%
   \else%
      \def\@svsechd{#5{\hskip #2\relax #6}}%
   \fi%
   \@xsect{#4}%
}%
%
\def\@startsection#1#2#3#4#5#6{%
   \if@noskipsec\leavevmode\fi%
   \par%
   \@tempskipa #4\relax%
   \@afterindenttrue%
   \ifdim \@tempskipa <\z@%
      \@tempskipa-\@tempskipa%
      \@afterindentfalse%
   \fi
   \if@nobreak
      %\ifnum#2=2%
      %   \vspace*{-2.4\p@}%
      %\fi%
      \everypar{}%
   \else%
      \addpenalty\@secpenalty%
      \addvspace\@tempskipa%
   \fi%
   \@ifstar%
      {\@ssect{#2}{#3}{#4}{#5}{#6}}%
      {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}%

%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% SECTION Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% LIST ENVIRONMENT Starts %%
%% Modified by LN %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\newdimen\labelwidthi
\newdimen\labelwidthii
\newdimen\labelwidthiii
\newdimen\labelwidthiv
\def\normal@labelsep{6pt}
\labelsep\normal@labelsep
%\settowidth{\labelwidthi}{(iii)}
%\settowidth{\labelwidthii}{(d)}
%\settowidth{\labelwidthiii}{(iii)}
%\settowidth{\labelwidthiv}{(M)}
\leftmargini\labelwidthi    \advance\leftmargini\labelsep
\leftmarginii\labelwidthii  \advance\leftmarginii\labelsep
\leftmarginiii\labelwidthiii \advance\leftmarginiii\labelsep
\leftmarginiv\labelwidthiv  \advance\leftmarginiv\labelsep
\def\setleftmargin#1#2{\settowidth{\@tempdima}{#2}\labelsep\normal@labelsep
  \csname labelwidth#1\endcsname\@tempdima
  \@tempdimb\@tempdima \advance\@tempdimb\labelsep
  \csname leftmargin#1\endcsname\@tempdimb}
\def\@listI{\leftmargin\leftmargini
  \labelwidth\labelwidthi \labelsep\normal@labelsep
  \topsep \z@ \partopsep\z@ \parsep\z@ \itemsep\z@
  \listparindent 1em}
\def\@listii{\leftmargin\leftmarginii
  \labelwidth\labelwidthii \labelsep\normal@labelsep
  \topsep\z@ \partopsep\z@ \parsep\z@ \itemsep\z@
  \listparindent 1em}
\def\@listiii{\leftmargin\leftmarginiii
  \labelwidth\labelwidthiii \labelsep\normal@labelsep
  \topsep\z@ \partopsep\z@ \parsep\z@ \itemsep\z@
  \listparindent 1em}
\def\@listiv{\leftmargin\leftmarginiv
  \labelwidth\labelwidthiv \labelsep\normal@labelsep
  \topsep\z@ \partopsep\z@ \parsep\z@ \itemsep\z@
  \listparindent 1em}
\let\@listi\@listI
\@listi
%
\setlength  \labelsep  {6pt}
\setlength  \labelwidth{\leftmargini}
\addtolength\labelwidth{\labelsep}
\@beginparpenalty -\@lowpenalty
\@endparpenalty   -\@lowpenalty
\@itempenalty     -\@lowpenalty
\def\labelitemi{$\bullet$}          \def\labelitemii{$\cdot$}

\gdef\@jcode{}

% \gdef\liststylecheck{\ifx\@jcode\@@@QJ\relax%
% \def\labelenumi{{\theenumi.}}        \def\theenumi{\arabic{enumi}}
% \def\labelenumii{{(\alph{enumii})}}   \def\theenumii{\theenumi\alph{enumii}}
% \def\labelenumiii{{(\roman{enumiii})}}\def\theenumiii{\theenumii.\roman{enumiii}}
% \def\labelenumiv{{(\Alph{enumiv})}}   \def\theenumiv{\theenumiii.\Alph{enumiv}}
% \else%
% \ifx\@jcode\@@@TEE\relax%
% \def\labelenumi{{\theenumi.}}        \def\theenumi{\arabic{enumi}}
% \def\labelenumii{{(\alph{enumii})}}   \def\theenumii{\theenumi\alph{enumii}}
% \def\labelenumiii{{(\roman{enumiii})}}\def\theenumiii{\theenumii.\roman{enumiii}}
% \def\labelenumiv{{(\Alph{enumiv})}}   \def\theenumiv{\theenumiii.\Alph{enumiv}}
% \else%
% \def\labelenumi{\textbf{\theenumi.}}        \def\theenumi{\arabic{enumi}}
% \def\labelenumii{\textbf{(\alph{enumii})}}   \def\theenumii{\theenumi\alph{enumii}}
% \def\labelenumiii{\textbf{(\roman{enumiii})}}\def\theenumiii{\theenumii.\roman{enumiii}}
% \def\labelenumiv{\textbf{(\Alph{enumiv})}}   \def\theenumiv{\theenumiii.\Alph{enumiv}}
% \fi\fi}%
% \liststylecheck%

%% Enumerate %%
\def\enumargs{%
   \listfont%
   \leftmargini\z@%\parindent%
   \advance\leftmargini by 2pt%
   \leftmarginii0pt%\parindent%
   \ifnum\@enumdepth=2\topsep0pt\else\topsep13pt\fi%NEWNJD
   \partopsep     \z@%
   \itemsep       \z@%
   \parsep        \z@%
   \labelsep      6pt%
   \rightmargin   \z@%
   \listparindent \parindent%
   \itemindent    \z@}%

\def\enumerate{%
    \@ifnextchar[{\@numerate}{\@numerate[0.]}}

\newif\ifEndNote%
\EndNotefalse%

\def\@numerate[#1]{\par%
     \ifnum \@enumdepth >3 \@toodeep\else
     \advance\@enumdepth \@ne
     \edef\@enumctr{enum\romannumeral\the\@enumdepth}
     \list{\csname label\@enumctr\endcsname}{%
       \enumargs%
       \ifEndNote\relax%
       \def\labelenumi{\theenumi}%
       \setlength{\leftmargin}{0pt}%
       \settowidth\labelwidth{$^{#1}$}%
       \setlength{\labelsep}{0.2em}%
       \advance\leftmargin by \labelwidth%
       \advance\leftmargin by \labelsep%
       \setlength{\itemsep}{3pt}%
       \usecounter{\@enumctr}%
       \def\makelabel##1{\hbox to \labelwidth{\hss\llap{$^{##1}$}}}%
       \else%
       \setlength{\leftmargin}{\csname leftmargin\romannumeral\the\@enumdepth\endcsname}%
       \usecounter{\@enumctr}%
       \settowidth\labelwidth{#1}%
       \addtolength{\leftmargin}{\labelwidth}%
       \addtolength{\leftmargin}{\labelsep}%
       \def\makelabel##1{\hss\llap{##1}}\fi}%
     \fi\leftskip0pt%
   }
\let\endenumerate\endlist%

%% Unnumbered list%%
\def\unenumargs{\undefined%
   \listfont%
   \leftmargini\parindent%
   \topsep13pt%
   \partopsep     \z@%
   \itemsep       \z@%
   \parsep        \z@%
   \labelsep      0\p@%
   \rightmargin   \z@%
   \raggedright%
   \listparindent \parindent%
   \itemindent    -10pt}%

\def\unenumerate{%
    \@ifnextchar[{\@unenumerate}{\@unenumerate[0.]}}

\def\@unenumerate[#1]{\par%
     \ifnum \@enumdepth >3 \@toodeep\else
     \advance\@enumdepth \@ne
     \edef\@enumctr{enum\romannumeral\the\@enumdepth}
     \list{\csname label\@enumctr\endcsname}{%
       \unenumargs
       \setlength{\leftmargin}{\csname leftmargin\romannumeral\the\@enumdepth\endcsname}
       \usecounter{\@enumctr}
       \settowidth\labelwidth{#1}
       \addtolength{\leftmargin}{\labelwidth}
       \addtolength{\leftmargin}{\labelsep}
       \def\makelabel##1{\hss\llap{##1}}}%
     \fi
   }
\let\endunenumerate\endlist%

\def\itemargs{%
   \listfont%
   \leftmargini\z@%
   %\advance\leftmargini by 1pt%
   \leftmarginii0pt%\parindent%NEWNJD
   \ifnum\@enumdepth=2\topsep0pt\else\topsep13pt\fi%NEWNJD
   \partopsep     \z@%
   \itemsep       \z@%
   \parsep        \z@%
   \labelsep      6pt%4.75pt%
   \rightmargin   \z@%
   %\raggedright%
   \listparindent \parindent%
   \itemindent    \z@}%

%\renewcommand\labelitemi{\hbox{{\normalsize\bfseries\textbullet}}}
\renewcommand\labelitemi{\hbox{{\fontsize{8}{8}\selectfont\bfseries\textbullet}}} %%LN20feb2016
\renewcommand\labelitemii{\textendash}

\def\itemize{%
   \@ifnextchar[{\@itemize}{\@itemize[$\bullet$]}}

\def\@itemize[#1]{\par%
     \ifnum \@itemdepth >3 \@toodeep\else
     \advance\@itemdepth \@ne
     \edef\@itemctr{item\romannumeral\the\@itemdepth}
     \list{\csname label\@itemctr\endcsname}{%
       \itemargs
       \setlength{\leftmargin}{\csname leftmargin\romannumeral\the\@itemdepth\endcsname}
       \settowidth\labelwidth{#1}
       \addtolength{\leftmargin}{\labelwidth}
       \addtolength{\leftmargin}{\labelsep}
       \def\makelabel##1{\hss \llap{##1}}}%
     \fi
   }
\let\enditemize\endlist

%% Verse %%
\def\verse{\undefined\let\\=\@centercr
  \list{}{\itemsep\z@
  \itemindent \z@
  \listparindent\z@
  \rightmargin 1em
  \leftmargin \rightmargin}\item[]}
\let\endverse\endlist

%% Quotation %%
\def\quotation{\list{}{\vskip 8pt\itemindent\z@
 \leftmargin 1em \rightmargin \z@
  \parsep \z@ \@plus 1pt}\item[]}
\newcommand\e{\endlist\vskip 8pt}
\let\endquotation\e

%% Quote %% LN
\def\quote{\list{}{\itemindent\z@\leftmargin 1em \rightmargin \z@}\item[]}
\let\endquote\endlist
\renewenvironment{quote}{%
  %\def\source##1{\raggedleft##1}%
  \def\Qsource##1{\vskip-13pt\par\hfill##1}%
  \let\source\Qsource%
  \list{}{\topsep=13pt\leftmargin=27\p@\rightmargin=27\p@%
          \parsep13pt}%
  \itshape\item\relax}{\endlist}

%% Description %%
\def\descriptionlabel#1{\hspace\labelsep \itshape #1}
\def\description{\undefined%
  \list{}{%
    \labelwidth\z@%
    \leftmargin\z@% 
   \topsep13pt%
    \itemindent\z@%-\leftmargin
    \let\makelabel\descriptionlabel%
    }%
}
\let\enddescription\endlist
\def\description{\@ifnextchar[{\@nnumerate}{\@nnumerate[0.]}}
%
\def\eenumargs{%\undefined%
   \listfont%
   \leftmargini   \z@%
   \topsep13pt%
   \partopsep     \z@%
   \itemsep       \z@%
   \parsep        \z@%
   \labelsep     4\p@%
   \rightmargin   \z@%
   \listparindent \parindent%
   \itemindent    \z@}%
%
\def\@nnumerate[#1]{\par%
     \ifnum \@enumdepth >3 \@toodeep\else
     \advance\@enumdepth \@ne
     \edef\@enumctr{enum\romannumeral\the\@enumdepth}
     \list{\csname label\@enumctr\endcsname}{%
       \eenumargs%
       \setlength{\leftmargin}{\csname leftmargin\romannumeral\the\@enumdepth\endcsname}
       \usecounter{\@enumctr}
       \settowidth\labelwidth{#1}
       \addtolength{\leftmargin}{\labelwidth}
       \addtolength{\leftmargin}{\labelsep}
       \def\makelabel##1{\hss\llap{##1}}}%
     \fi
   }
\let\enddescription\endlist
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% LIST ENVIRONMENT Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% FLOATS (TABLE/FIGURE) Starts %%
%% Modified by LN %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%

\long\def\SPIFIG#1#2{\centerline{#1}\raggedright#2}%

\newbox\holdfigbox%
\newbox\rotfigbox%

% \long\def\SPIFIG#1#2#3#4{\begingroup%
% \ffigure{#4}%
% %%%%TwoColLayoutStart%%%%
% \if@TwoColLayout%\else\columnhsizevalue\textwidth\fi%
% \setbox\holdfigbox=\hbox{\if!#3!\includegraphics[hiresbb]{\FigPath/#1}\else\includegraphics[hiresbb,scale=#3]{\FigPath/#1}\fi}%
% \figurewidth=\wd\holdfigbox%
% \figureheight=\ht\holdfigbox%
% \advance\figureheight by \dp\holdfigbox%
% \ifdim\figurewidth>\textwidth%
%    \setbox\rotfigbox=\hbox{%
%    \vsize=\textwidth%
%    \hsize=\textheight%
%    \ifdim\figurewidth>1.01\textheight%
%       \warning Figure exceeds land hsize%
%    \else%
%       \advance\vsize by -1pc%  PURPOSELY INSERTED BY SRILEKHA ON JUNE 8TH 04.
%       \vbox to \vsize{\vfill\centerline{\unhbox\holdfigbox}%
% \nointerlineskip%
% #2\vfill}%
%    \fi}%
%       \rotlt{\rotfigbox}%
% \else%
% \ifdim\figurewidth>1.01\columnhsizevalue%
% \vbox{\hsize=\hsize\textwidth=\hsize\linewidth=\hsize%
% \raggedright%
% \hbox to \textwidth{\hfil\unhbox\holdfigbox\hfil}\par%
% \nointerlineskip%
% #2}%
% \else%
% \vbox{\hsize=\columnhsizevalue\textwidth=\columnhsizevalue\linewidth=\columnhsizevalue%
% \raggedright%
% \hbox to \columnhsizevalue{\hfil\unhbox\holdfigbox\hfil}\par%
% \nointerlineskip%
% #2}%
% \fi\fi%
% %%%%TwoColLayoutEND%%%%
% \else%
% \setbox\holdfigbox=\hbox{\if!#3!\includegraphics[hiresbb]{\FigPath/#1}\else\includegraphics[hiresbb,scale=#3]{\FigPath/#1}\fi}%
% \figurewidth=\wd\holdfigbox%
% \figureheight=\ht\holdfigbox%
% \advance\figureheight by \dp\holdfigbox%
% \ifdim\figurewidth>\textwidth%
%    \setbox\rotfigbox=\hbox{%
%    \vsize=\textwidth%
%    \hsize=\textheight%
%    \ifdim\figurewidth>1.01\textheight%
%       \warning Figure exceeds land hsize%
%    \else%
%       \advance\vsize by -1pc%  PURPOSELY INSERTED BY SRILEKHA ON JUNE 8TH 04.
%       \vbox to \vsize{\vfill\centerline{\unhbox\holdfigbox}%
% \nointerlineskip%
% #2\vfill}%
%    \fi}%
%       \rotlt{\rotfigbox}%
% \else%
% \vbox{%\hsize=\hsize\textwidth=\hsize\linewidth=\hsize%
% \raggedright%
% \hbox to \textwidth{\hfil\unhbox\holdfigbox\hfil}\par%
% \nointerlineskip%
% #2}%
% \fi%
% \fi%%%TWOcollayout%%%
% \endgroup}%

\def\nicaption#1{\begingroup\raggedright%\vskip2pt%
\nobreak\vspace*{6pt}\nobreak%
%\logaddcontentsline{ltf}{Figure}{Placement of \figurename\space\thefigure}%
\@makecaption{{\figurenumfont\fnum@figure\ignorespaces\hskip-8pt}}{\figurecaptionfont\if!#1!\else#1\fi}\par%
\endgroup}

\renewenvironment{figure}
               {\let\marginpar\@gobble\@float{figure}}
               {\end@float}
\renewenvironment{figure*}
               {\let\marginpar\@gobble\@dblfloat{figure}}
               {\end@dblfloat}
\newenvironment{nifigure}
               {\begingroup\let\caption\nicaption\parindent=0pt\ifFloatPositionTop\relax\else\removelastskip\vskip\textfloatsep\fi%
           \refstepcounter{figure}\let\marginpar\@gobble}%\@float{figure}}
               {\par\ifFloatPositionBot\relax\else\removelastskip\vskip\textfloatsep\fi\endgroup}

\newenvironment{nifigure*}
               {\begingroup\let\caption\nicaption\hsize=\textwidth\parindent=0pt\ifFloatPositionTop\relax\else\removelastskip\vskip\textfloatsep\fi%
           \refstepcounter{figure}\let\marginpar\@gobble}%\@float{figure}}
               {\par\ifFloatPositionBot\relax\else\removelastskip\vskip\textfloatsep\fi\endgroup}

%
\newif\iftable\global\tablefalse%

\definecolor{TabRowColor}{gray}{0.9}%
\definecolor{TabColHeadColor}{gray}{0.8}%NEWNJD

%\def\muerowcolors#1{\rowcolors*{#1}{white}{TabRowColor}}%
\def\Altrowcolors#1{\ifthenelse{\equal{#1}{1}}{\rowcolors{#1}{}{TabRowColor}}{%
\ifthenelse{\equal{#1}{2}}{\rowcolors*{#1}{TabRowColor}{}}{\undefined}}}%

\renewenvironment{table}
               {%\arrayrulecolor{Blue}%
               \global\tabletrue%
               \let\marginpar\@gobble\@float{table}}
               {\end@float\global\tablefalse}

\newenvironment{noninstable}
               {%\arrayrulecolor{Blue}%
               \global\tabletrue%
               \def\@captype{table}%
               \let\marginpar\@gobble%\@dblfloat{table}
}%
               {%\end@dblfloat
\global\tablefalse}

\newenvironment{noninstable*}
               {%\arrayrulecolor{Blue}%
               \global\tabletrue%
               \def\@captype{table}%
               \let\marginpar\@gobble%\@dblfloat{table}
}%
               {%\end@dblfloat
\global\tablefalse}

\newenvironment{nitable}
               {%\arrayrulecolor{Blue}%
               \global\tabletrue%
               \def\@captype{table}%
               \let\marginpar\@gobble%\@dblfloat{table}
}%
               {%\end@dblfloat
\global\tablefalse}

%\newenvironment{wideeq*}
%               {\@dblfloat{table}}
%               {\end@dblfloat}

\setlength\abovecaptionskip{10.2\p@}
\newdimen\tabbelowcaptionskip%
%\tabbelowcaptionskip=-2.5pt%
\tabbelowcaptionskip=-2.5pt%%%15FEBSHE
%\setlength\belowcaptionskip{0pt}
%\setlength\abovecaptionskip{14\p@}
\setlength\belowcaptionskip{14\p@}

\setlength\arraycolsep{2\p@}
\setlength\tabcolsep{6\p@}
\setlength\arrayrulewidth{.4\p@}
\setlength\doublerulesep{2\p@}
\setlength\tabbingsep{\labelsep}

\def\thetable{\arabic{table}}
\def\fnum@figure{\figurenumfont{\figurename}\hspace*{5pt}\relax\textbf{\thefigure.\hskip5pt}} %%LN
\def\fnum@table{{\tablename}\hspace*{5pt}\relax\textbf{\thetable}.}

\newdimen\tabinddim%
\tabinddim=12pt%

%\def\tabindent{\hskip\tabcolsep}%{\tabinddim}%
\def\tabindent{\hspace*{6pt}}%{\tabinddim}%

\def\FigName{figure}

\def\OCFigCaptnTxt{[Color figure can be viewed in the online issue, which is available at wileyonlinelibrary.com.]}%

\def\ocfigcheck{\ifx\@jcode\@@@QJ\ifOCFig\ifnoneedonlincolor\else\ifnum\webcolorfigcnt=1\else\warning{\fontsize{22}{0}\selectfont\textcolor{red}{ERROR: webcolortext missing}}\fi\fi\fi\fi}%02April_Sheela

\long\def\@makecaption#1#2{%
    \ifx\FigName\@captype
      \vskip\abovecaptionskip%
        \raggedright%%%NEWNJD
        \@figurecaption{#1}{#2\ocfigcheck}%\fi%
    \else
        \raggedright%%%NEWNJD
        \@tablecaption{#1}{#2}%
      \vskip\tabbelowcaptionskip%
    \fi%
}

\newdimen\lbwfigcapmovedim%
\newdimen\rbwfigcapmovedim%

\newbox\bwfigcaphtbox
\newdimen\bwfigcaphtdim\bwfigcaphtdim0pt

\newcount\webcolorfigcnt%
\global\webcolorfigcnt=0%

\gdef\oFigref#1#2{%
\global\webcolorfigcnt=0\relax%%02April_Sheela
  \global\setbox\bwfigcaphtbox\vbox{{\figurenumfont #1}{\ignorespaces\hspace*{9pt}\ignorespaces}{\figurecaptionfont #2\rlap{\vphantom{y}}\par}}%
  \global\bwfigcaphtdim\ht\bwfigcaphtbox%
  \global\advance\bwfigcaphtdim\dp\bwfigcaphtbox%
  \global\advance\bwfigcaphtdim5\p@%
  \expandafter\gdef\csname \art@id#1\endcsname{\begingroup\relax#2\ocfigcheck\endgroup}%
}%

\def\fignegskip{\nointerlineskip\vskip-0pt}%

\long\def\tabfigure#1#2#3#4{\begingroup\parindent=0pt%\undefined_style_not_checked%
\ifx #3\ifig\relax%
%\edef\FigPath{u:}%%
\else%
\ifx #3\OCifig\relax%
  \global\OCFigtrue%
  {\vbox to \z@{%
    \vskip\bwfigcaphtdim%
    \vskip\abovecaptionskip%
    \vskip\bwfigdimen%
    \hb@xt@\z@{\hspace*{-9\p@}\OCifig}%
  }}%
%\edef\FigPath{f:}%%
\else\undefined\fi\fi%
\setbox\holdfigbox=\hbox{\if!#2!\includegraphics{\FigPath/#1}\else\includegraphics[scale=#2]{\FigPath/#1}\fi}%
\figurewidth=\wd\holdfigbox%
\figureheight=\ht\holdfigbox%
\def\vtopholdfig{\vtop{\vskip-4pt\hbox{\hfill%
\vtop to \figureheight{\vfil\hbox to\figurewidth{%
\unhbox\holdfigbox\hfil}}\hfill}%
\fignegskip}%This is used to reduce white space of epsfigures
}%
\def\vcenterholdfig{$\vcenter{\hbox{\hfill%
\vtop to \figureheight{\vfil\hbox to\figurewidth{%
\unhbox\holdfigbox\hfil}}\hfill}%
\fignegskip}$%This is used to reduce white space of epsfigures
}%
\ifx #4\TOP%
 \vtopholdfig%
\else%
\ifx #4\CENTER%
 \vcenterholdfig%
\else%
 \undefined%
\fi\fi%
\endgroup}%

%%%%%% Color Figure Information %%%%%%%%%
\newif\ifOCFig%
\OCFigfalse%

\newif\ifPCFig%
\PCFigfalse%

\newbox\bwfigbox%
\newdimen\bwfigdimen%
\newdimen\lbwfigcapmovedim%
\newdimen\rbwfigcapmovedim%

\let\ifig=a%
\let\OCifig=b%
\let\OCrifig=c%
\let\PCifig=d%
\let\PCrifig=e%

\newif\ifColorQuery%
\ColorQueryfalse%

\def\bwfiginfo{%\gdef\bwfig@info{Color online, B\&W in print}%
\ifx\@jcode\@@@QJ%
\ifnoneedonlincolor\else%
\ifOCFig%
\fbox{\fboxsep=9pt\bwfiginfofont\ Color online, B\&W in print\ }%
\else%
\ifPCFig%
\fbox{\fboxsep=9pt\bwfiginfofont\ Color\ }%
\fi\fi%
\fi%
\else%
\ifOCFig%
\fbox{\fboxsep=9pt\bwfiginfofont\ Color online, B\&W in print\ }%
\else%
\ifPCFig%
\fbox{\fboxsep=9pt\bwfiginfofont\ Color\ }%
\fi\fi%
\fi}%

\def\webcolortext#1{\ifx\@jcode\@@@QJ\ifnoneedonlincolor\else\global\webcolorfigcnt=1#1\fi\fi}%

\def\pcwebcolorcheck#1{\ifx\@jcode\@@@QJ\global\webcolorfigcnt=1\def\webcolortext##1{\protect\phantom{##1}}\fi}%%%02Arpil_Sheela

%%OCFig Defns
\global\def\ffigure#1{%
\if!#1!%
\pcwebcolorcheck{##1}%
\else%
\ifx #1\ifig%
\pcwebcolorcheck{##1}%
\else%
\ifx #1\OCifig%
\ifx\@jcode\@@@QJ\global\ColorQuerytrue\fi%
\OCFigtrue%
\margincol
\let\margincol=\lmargincol%
\else%
\ifx #1\PCifig%
\ifx\@jcode\@@@QJ\global\ColorQuerytrue\fi%
\PCFigtrue%
\pcwebcolorcheck{##1}%
\margincol
\let\margincol=\lmargincol%
\else%
\ifx #1\OCrifig%
\ifx\@jcode\@@@QJ\global\ColorQuerytrue\fi%
\OCFigtrue%
\rmargincol
\let\margincol=\rmargincol%
\else%
\ifx #1\PCrifig%
\ifx\@jcode\@@@QJ\global\ColorQuerytrue\fi%
\PCFigtrue%
\pcwebcolorcheck{##1}%
\rmargincol
\let\margincol=\rmargincol%
\else%
 \undefined%
\fi\fi\fi\fi\fi\fi}%

\gdef\margincol{\ifIssue\else\ifEV\else\parindent=0pt%
{\smash{\lower10pc\hbox{\llap{\hskip\hsize\hskip6pt\vbox{\hsize=2.5pc\parindent=0pt%
\rotatebox{90}{\bwfiginfo}\quad}}}}}%
\fi\fi}%

\gdef\lmargincol{\ifIssue\else\ifEV\else\parindent=0pt%
\fboxsep=3pt\fboxrule=1pt%
{\smash{\lower10pc\hbox{\llap{\hskip\hsize\hskip6pt\vbox{\hsize=2.5pc\parindent=0pt%
\rotatebox{90}{\bwfiginfo}\quad}}}}}%
\fi\fi}%

\gdef\rmargincol{\ifIssue\else\ifEV\else\parindent=0pt%
\fboxsep=3pt\fboxrule=1pt%
{\smash{\lower10pc\hbox{\rlap{\hskip\hsize\hskip6pt\vbox{\hsize=2.5pc\parindent=0pt%
\rotatebox{90}{\bwfiginfo}\quad}}}}}%
\fi\fi}%

% \newcommand\OCrifig[1][]{%
%    \global\setbox\bwfigbox\hbox{\bwfig@info}%
%    \global\bwfigdimen\wd\bwfigbox%
%    \lbwfigcapmovedim=\hsize%
%    \advance\lbwfigcapmovedim by 18\p@%
%    \vspace*{-\baselineskip}%
%    \vbox{\centering%
%    \vbox to \z@{%
%      \vskip-\bwfigcaphtdim%
%      \vskip-\abovecaptionskip%
%      \vskip-\bwfigdimen%
%      \hspace*{\lbwfigcapmovedim}%
%      {\begin{turn}{90}{\if@printerpdf\else\box\bwfigbox\fi}\end{turn}}%
%    }%
% }}%
% \newcommand\OCifig[1][]{%
%    \global\setbox\bwfigbox\hbox{\bwfig@info}%
%    \global\bwfigdimen\wd\bwfigbox%
%    \rbwfigcapmovedim=\hsize%
%    \advance\rbwfigcapmovedim by 3.5pc%
%    \vspace*{-\baselineskip}%
%    \vbox{\centering%
%    \vbox to \z@{%
%      \vskip-\bwfigcaphtdim%
%      \vskip-2\abovecaptionskip%
%      \vskip-\bwfigdimen%
%      \hspace*{-\rbwfigcapmovedim}%
%      {\begin{turn}{90}{\if@printerpdf\else\box\bwfigbox\fi}\end{turn}}%
%    }%
% }}%
% 
% %%PCFig Defns
% \newcommand\PCrifig[1][]{%
%    \global\setbox\bwfigbox\hbox{\bwfig@info}%
%    \global\bwfigdimen\wd\bwfigbox%
%    \lbwfigcapmovedim=\hsize%
%    \advance\lbwfigcapmovedim by 18\p@%
%    \vspace*{-\baselineskip}%
%    \vbox{\centering%
%    \vbox to \z@{%
%      \vskip-\bwfigcaphtdim%
%      \vskip-\abovecaptionskip%
%      \vskip-\bwfigdimen%
%      \hspace*{\lbwfigcapmovedim}%
%      {\begin{turn}{90}{\if@printerpdf\else\box\bwfigbox\fi}\end{turn}}%
%    }%
% }}%
% \newcommand\PCifig[1][]{%
%    \global\setbox\bwfigbox\hbox{\bwfig@info}%
%    \global\bwfigdimen\wd\bwfigbox%
%    \rbwfigcapmovedim=\hsize%
%    \advance\rbwfigcapmovedim by 3.5pc%
%    \vspace*{-\baselineskip}%
%    \vbox{\centering%
%    \vbox to \z@{%
%      \vskip-\bwfigcaphtdim%
%      \vskip-2\abovecaptionskip%
%      \vskip-\bwfigdimen%
%      \hspace*{-\rbwfigcapmovedim}%
%      {\begin{turn}{90}{\if@printerpdf\else\box\bwfigbox\fi}\end{turn}}%
%    }%
% }}%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newbox\figcapbox
\newbox\capbox
\long\def\@figurecaption#1#2{{%LN 10feb2015
\setbox\figcapbox\hbox{\bgroup{\figurenumfont #1}\space{\figurecaptionfont#2}\egroup}%
\ifdim\wd\figcapbox>\hsize% 
    \raggedright%
  {\figurenumfont #1}{\ignorespaces}{\figurecaptionfont#2\rlap{\vphantom{y}}\par}%
\else%
  \raggedright%
  {\figurenumfont #1}{\ignorespaces}{\figurecaptionfont#2\rlap{\vphantom{y}}\par}%\par% 
\fi%
}}%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%\RequirePackage{booktabs}
%\cmidrulewidth=.4pt%
%
%\def\tablenumfont{\fontfamily{\sfdefault}\fontsize{8bp}{9bp}\fontseries{b}\selectfont}
%\def\tablecaptionfont{\fontfamily{\sfdefault}\fontsize{8bp}{9bp}\selectfont}
%\def\tablebodyfont{\fontfamily{\sfdefault}\fontsize{8bp}{11bp}\selectfont}
%\def\tablecolheadfont{\fontfamily{\sfdefault}\fontsize{8bp}{9bp}\selectfont}
%\def\tablefootnotefont{\fontfamily{\sfdefault}\fontsize{8bp}{9bp}\selectfont}

%% Table Macro
\newbox\tablebox
%% Table Caption
\newbox\tabcapbox
\newdimen\tabcapwidth
\newdimen\tabcapheight
\newdimen\tabcapheightADV

\long\def\@tablecaption#1#2{%LN 09feb2016
  {%
  \setbox\tabcapbox\vbox{\hsize\textwidth%
  \raggedright%LN
  \tablecaptionfont{\tablenumfont #1}\hspace*{8.5pt}\textbf{#2}\vphantom{y}\endgraf}%
  \tabcapheight\ht\tabcapbox%
  \advance\tabcapheight\dp\tabcapbox%
  \tabcapheightADV\tabcapheight%
  \advance\tabcapheightADV10pt%
  {\tablecaptionfont{\tablenumfont #1}\hspace*{8.5pt}\textbf{#2}\vphantom{y}\par}\vspace*{6\p@}%
  }%
}

%% Table Column Heads
\def\TCH#1{{\tablecolheadfont #1}}
%
%% Table Rules
\def\toprule{%\noalign{\vskip3pt}
\noalign{\ifnum0=`}\fi
  \hrule \@height 0\p@ \@width 0pt
  \hrule \@height 1\p@ % <- rule height
  \hrule \@height 0pt \@width 0pt
  \futurelet\@tempa\@xhline}
%\def\toprule{}%
%\def\toprule{}%%%LN 02feb2016

 \def\midrule{%
 \noalign{\ifnum0=`}\fi%
   \hrule \@height 0pt \@width 0pt
   \hrule \@height 0.5pt % <- rule height
   \hrule \@height 2.5pt \@width 0pt
   \futurelet \@tempa\@xhline%
 }%

%\def\midrule{}%

\newcounter{tabcolumncnt}

\def\bblack{\special{ps:gsave 0 setgray}}%
\def\eblack{\special{ps:grestore}}%

% Bottom rule
%\def\botrule{\noalign{\ifnum0=`}\fi
%  \hrule \@height 2.8pt \@width 0pt
%  \hrule \@height .4\p@ % <- rule height
%  \hrule \@height -4.1pt \@width 0pt
%  \futurelet\@tempa\@xhline}
%
\def\botrule{\noalign{\ifnum0=`}\fi%%LN 02feb2016
%  \hrule \@height .1pt \@width 0pt
  \hrule \@height 1\p@ % <- rule height
  \hrule \@height -15pt \@width 0pt
  \futurelet\@tempa\@xhline}

\def\@@@cmidrule[#1-#2]#3#4{\global\@cmidla#1\relax
    \global\advance\@cmidla\m@ne
    \ifnum\@cmidla>0\global\let\@gtempa\@cmidrulea\else
    \global\let\@gtempa\@cmidruleb\fi
    \global\@cmidlb#2\relax
    \global\advance\@cmidlb-\@cmidla
    \global\@thisrulewidth=#3
    \@setrulekerning{#4}
    \belowrulesep=-1pt%
    %\ifnum\@lastruleclass=\z@\vskip 2.8\p@\fi
    %\ifnum\@lastruleclass=\z@\vskip 1.6\p@\fi
    \ifnum\@lastruleclass=\z@\vskip -1\p@\fi
    \ifnum0=`{\fi}\@gtempa
    \noalign{\ifnum0=`}\fi\futurenonspacelet\@tempa\@xcmidrule}
\def\@xcmidrule{%
   \ifx\@tempa\cmidrule
       \vskip-\@thisrulewidth
       \global\@lastruleclass=\@ne
   \else \ifx\@tempa\morecmidrules
       \vskip \cmidrulesep
       \global\@lastruleclass=\@ne\else
       %\vskip 3.5\p@
       \vskip 1\p@
       \global\@lastruleclass=\z@
   \fi\fi
   \ifnum0=`{\fi}}
%\let\cline\cmidrule

%
\newbox\tablebox
\newdimen\tabledim

\def\tabfootnoterule{{\hrule height0.5pt}}%

\def\Listraggedright{%%\let\\\@centercr
\@flushglue=0pt plus 1fil%
\@rightskip\@flushglue \rightskip\@rightskip%
\leftskip\z@skip%
\parfillskip=0pt%
\parindent\z@}%

%\newenvironment{tablenotes}{\list{}{\setlength{\labelsep}{0pt}% 
%\setlength{\labelwidth}{0pt}%
%\setlength{\leftmargin}{6pt}%
%\setlength{\rightmargin}{6pt}%
%\setlength{\topsep}{0pt}% 22-11=11
%\setlength{\itemsep}{0pt}%
%\setlength{\partopsep}{0pt}%
%\setlength{\listparindent}{0em}%
%\setlength{\parsep}{0pt}}%
%\item\relax%
%}{\endlist}%
\newenvironment{tablenotes}{\list{}{\setlength{\labelsep}{0pt}% 
\setlength{\labelwidth}{0pt}%
\setlength{\leftmargin}{0pt}%
\setlength{\rightmargin}{0pt}%
\setlength{\topsep}{0pt}% 22-11=11
\setlength{\itemsep}{0pt}%
\setlength{\partopsep}{0pt}%
\setlength{\listparindent}{0em}%
\setlength{\parsep}{0pt}}%
\item\relax%
\Listraggedright}{\par\endlist}%

\def\nullbotrule{}%

\newdimen\tempdime
\newbox\temptbox
\newbox\rottabbox%
\newcount\landtablecnt%
\landtablecnt=0%
\newcommand\processtable[3]{\bgroup%
   \def\tnote##1{##1}%%
   \setbox\temptbox=\hbox{\tablebodyfont#2}%
   \global\tempdime\wd\temptbox%
   \ifdim\tempdime>1.01\textwidth%
     \setbox\rottabbox=\hbox{%
     \fullwidth=\textheight%
     \vsize=\textwidth%
     \hsize=\textheight%
        \advance\vsize by -1pc%  PURPOSELY INSERTED BY SRILEKHA ON JUNE 8TH 04.
        \vbox to \vsize{\vfill\@processtable{#1}{#2}{#3}{\tempdime}\vfill}%
}%
     \rotlt{\rottabbox}%
\else%
   \@processtable{#1}{#2}{#3}{\tempdime}%
   \global\sidewaystablefalse%
\fi%
   \egroup%
\addvspace{0pt}}%

\newdimen\tabruledimen%

\newbox\rottabbox%
\newdimen\fullwidth%

\newif\if@kaprotate \@kaprotatefalse
\def\kaprotate{\global\@kaprotatetrue}
\def\endkaprotate{\global\@kaprotatefalse}

\newdimen\rotdimen%
\newdimen\rotwddimen%
\def\vspec#1{\special{ps:#1}}%
\def\rotstart#1{\vspec{gsave currentpoint currentpoint translate #1 neg exch neg exch translate}}%
\def\rotfinish{\vspec{currentpoint grestore moveto}}%

\def\rotl#1{\rotdimen=\ht#1\advance\rotdimen by \dp#1
    \hbox to \rotdimen{\vbox to\wd#1{\vskip \wd#1
    \rotstart{270 rotate}\box #1\vss}\hss}\rotfinish}

\def\rotr#1{\rotdimen=\ht #1\advance\rotdimen by \dp#1
    \hbox to \rotdimen{\vbox to \wd#1{\vskip \wd#1
    \rotstart{90 rotate}\box #1\vss}\hss}\rotfinish}

\def\rotlt#1{\rotdimen=\ht#1\advance\rotdimen by\dp#1%
   \hbox to\rotdimen{\vbox to\wd#1{\vskip\wd#1\rotstart{270 rotate}%
   \box#1\vss}\hss}\rotfinish}%

\newdimen\rotwddimen%
\def\rotrt#1{\rotdimen=\ht#1\advance\rotdimen by\dp#1%
\rotwddimen=\wd#1\advance\rotwddimen by -0.5pt%
   \hbox to\rotdimen{\hskip\ht#1\vbox to\rotwddimen{\rotstart{-270 rotate}%
   \copy#1\vss}\hss}\rotfinish}%

\def\rotdiag#1{\rotdimen=\ht#1\advance\rotdimen by\dp#1%
   \hbox to\rotdimen{\vbox to\wd#1{\vskip\wd#1\rotstart{-45 rotate}%
   \box#1\vss}\hss}\rotfinish}%

\newif\ifsidewaystable\global\sidewaystablefalse%

\def\raggedcenter{\leftskip=0pt plus 0.5fil\rightskip=0pt plus 0.5fil%
\parfillskip=0pt}%

\newenvironment{@processtable}[4]{%LN 09feb2016
%#1 caption - #2 tabular - #3 table footnote - #4 table caption width%
\setbox4=\hbox to \hsize{\hss%
%   \def\setstrut{\setbox\strutbox=\hbox{\vrule height10.4pt depth2.6pt width0pt}}%
   \def\setstrut{\setbox\strutbox=\hbox{\vrule height12.4pt depth3.6pt width0pt}}%
    \begin{minipage}[t]{#4}%
    \raggedcenter%
    \caption{#1}\par%
    {\tablebodyfont\setstrut\noindent\ignorespaces #2\par}%
    \vglue4.6pt%%%\vglue6pt%15FEBSHE
    {\if!#3!\else\vspace*{13pt}{\tablefootnotefont#3\par}\fi}%
    \end{minipage}%
   \hss}%
\box4\par%\vglue12pt
}%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% FLOATS (TABLE/FIGURE) Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% TABLE OF CONTENTS Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\renewcommand\@pnumwidth{1.55em}
\renewcommand\@tocrmarg{2.55em}
\renewcommand\@dotsep{4.5}
\setcounter{tocdepth}{3}
\renewcommand\tableofcontents{%
    \section*{\contentsname
        \@mkboth{%
           \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
    \@starttoc{toc}%
    }
\renewcommand*\l@part[2]{%
  \ifnum \c@tocdepth >-2\relax
    \addpenalty\@secpenalty
    \addvspace{2.25em \@plus\p@}%
    \begingroup
      \setlength\@tempdima{3em}%
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      {\leavevmode
       \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par
       \nobreak
       \if@compatibility
         \global\@nobreaktrue
         \everypar{\global\@nobreakfalse\everypar{}}%
      \fi
    \endgroup
  \fi}
\renewcommand*\l@section[2]{%
  \ifnum \c@tocdepth >\z@
    \addpenalty\@secpenalty
    \addvspace{1.0em \@plus\p@}%
    \setlength\@tempdima{1.5em}%
    \begingroup
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode \bfseries
      \advance\leftskip\@tempdima
      \hskip -\leftskip
      #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
    \endgroup
  \fi}
\renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
\renewcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
\renewcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
\renewcommand*\l@subparagraph{\@dottedtocline{5}{10em}{5em}}
\renewcommand\listoffigures{%
    \section*{\listfigurename
      \@mkboth{\MakeUppercase\listfigurename}%
              {\MakeUppercase\listfigurename}}%
    \@starttoc{lof}%
    }
\renewcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
\renewcommand\listoftables{%
    \section*{\listtablename
      \@mkboth{%
          \MakeUppercase\listtablename}{\MakeUppercase\listtablename}}%
    \@starttoc{lot}%
    }
\let\l@table\l@figure
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% TABLE OF CONTENTS Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% APPENDIX Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\newif\ifbackmatter%
\newcommand{\backmatter}{\par\global\backmattertrue}%
%\def\backmatterchk{%
%  \ifbackmatter\else%
%  \@latexerr{\MessageBreak%
%  ***********************************************\MessageBreak%
%  * ERROR: Provide \string\backmatter\ command  *\MessageBreak%
%  * in your TeX file before backmatter text!    *\MessageBreak%
%  ***********************************************}\@ehc%
%  \fi%
%}%
\AtEndDocument{%\ignorecategory{\backmatterchk}
}%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%% Appendix %%%%%%%%%%%%%%%%%%%%%%%%%
%% Modified by LN %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Placed in wb_std-xml.sty %%
%%
\def\appendix{%
%%\figcount=1%
%%\tabcount=1%
%%\floatctr=0%
%  \setcounter{section}\z@
%  \setcounter{subsection}\z@
%  \setcounter{subsubsection}\z@
%%  \setcounter{figure}\z@
%%  \setcounter{table}\z@
%  \setcounter{equation}\z@
%  \stepcounter{section}{}
%  \gdef\thesection{\relax}%
%  \gdef\thesubsection{\undefined}%
%  \gdef\thesubsubsection{\undefined}%
%  \gdef\thefigure{\@Alph\c@section.\arabic{figure}}%
%  \def\tabfigsuffix{\@Alph\c@section.\the\floatctr}%
  %\gdef\theHfigure{\arabic{figure}}%
%  \gdef\thetable{\@Alph\c@section.\arabic{table}}%
%  \gdef\theHtable{\@Alph\c@section.\arabic{table}}%
%  \@addtoreset{equation}{section}%
%  \gdef\theequation{\@Alph\c@section.\arabic{equation}}%
}%
%%
%\def\APPsep{\par\addvspace{12pt}}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% APPENDIX Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% INDEX Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\renewenvironment{theindex}
               {\if@twocolumn
                  \@restonecolfalse
                \else
                  \@restonecoltrue
                \fi
                \columnseprule \z@
                \columnsep 35\p@
                \twocolumn[\section*{\indexname}]%
                \@mkboth{\MakeUppercase\indexname}%
                        {\MakeUppercase\indexname}%
                \thispagestyle{plain}\parindent\z@
                \parskip\z@ \@plus .3\p@\relax
                \let\item\@idxitem}
               {\if@restonecol\onecolumn\else\clearpage\fi}
\renewcommand\@idxitem{\par\hangindent 40\p@}
\renewcommand\subitem{\@idxitem \hspace*{20\p@}}
\renewcommand\subsubitem{\@idxitem \hspace*{30\p@}}
\renewcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% INDEX Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% FOOTNOTE Starts %%
%% Modified by LN %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\newcommand\thanksFNrule{%
  \kern-3\p@%
  {\color{thirtyfivepercent}\hrule height.5pt \@width\hsize}%
  \kern4.4\p@%
}%
%
\renewcommand\dotfill{\leavevmode\cleaders% LN20feb2016
     \hbox{$\m@th \mkern1.5mu\scriptstyle{.}\mkern1.5mu$}\hfill\kern\z@}

\renewcommand\footnoterule{%%LN
   \kern-3\p@%
   {\hrule height0.5pt width5pc}%
   \kern3\p@%
}%
%
%
\renewcommand{\thefootnote}{\@arabic\c@footnote}% FOR FOOTNOTE SYMBOL

\renewcommand\@makefntext[1]{\begingroup%
\reset@font\footnotetextfont%
\parindent0em%
\leavevmode\smash{\@makefnmark}#1\endgroup}%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% FOOTNOTE Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% ALGORITHM Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%\RequirePackage{alltt}
%\def\verbatim@font{\normalfont\ttfamily\fontsize{9bp}{12}\selectfont}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% ALGORITHM Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% THEOREM ENVIRONMENT Starts %%
%% Modified by LN %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\RequirePackage{amsthm}

\def\thmenddot{.}%%

\newtheoremstyle{WBstyleone}
  {6\p@} % Space above
  {6\p@} % Space below
  {\normalfont\itshape} % Body font
  {\z@} % Indent amount
  {\bfseries} % Theorem head font
  {\thmenddot} % Punctuation after theorem head
  {5\p@} % Space after theorem head
  {} % Theorem head spec (can be left empty, meaning `normal')

\newtheoremstyle{WBstyletwo}
  {6\p@} % Space above
  {6\p@} % Space below
  {\normalfont} % Body font
  {\z@} % Indent amount
  {\bfseries} % Theorem head font
  {\thmenddot} % Punctuation after theorem head
  {5\p@} % Space after theorem head
  {} % Theorem head spec (can be left empty, meaning `normal')

\newtheoremstyle{WBstylethree}
  {6\p@} % Space above
  {6\p@} % Space below
  {\normalfont} % Body font
  {\z@} % Indent amount
  {\itshape} % Theorem head font
  {\thmenddot} % Punctuation after theorem head
  {5\p@} % Space after theorem head
  {} % Theorem head spec (can be left empty, meaning `normal')

\theoremstyle{plain}
\newtheorem{algorithm}{Algorithm}
\newtheorem{assertion}{Assertion}
\newtheorem{axiom}{Axiom}
\newtheorem{conjecture}{Conjecture}
\newtheorem{corollary}{Corollary}
\newtheorem{criterion}{Criterion}
\newtheorem{hypothesis}{Hypothesis}
\newtheorem{lemma}{Lemma}
\newtheorem{proposition}{Proposition}
\newtheorem{reduction}{Reduction}
\newtheorem{sublemma}{Sublemma}
\newtheorem{theorem}{Theorem}

\theoremstyle{definition}
\newtheorem{affirmation}{Affirmation}
\newtheorem{application}{Application}
\newtheorem{assumptions}{Assumptions}
\newtheorem{condition}{Condition}
\newtheorem{convention}{Convention}
\newtheorem{definition}{Definition}
\newtheorem{discussion}{Discussion}
\newtheorem{example}{Example}
\newtheorem{exercise}{Exercise}
\newtheorem{fact}{Fact}
\newtheorem{model}{Model}
\newtheorem{problem}{Problem}
\newtheorem{property}{Property}
\newtheorem{question}{Question}
\newtheorem{scholium}{Scholium}
\newtheorem{terminology}{Terminology}

\theoremstyle{remark}
\newtheorem{answer}{Answer}
\newtheorem{base}{Base}
\newtheorem{case}{Case}
\newtheorem{claim}{Claim}
\newtheorem{comment}{Comment}
\newtheorem{conclusion}{Conclusion}
\newtheorem{note}{Note}
\newtheorem{notation}{Notation}
\newtheorem{observation}{Observation}
\newtheorem{remark}{Remark}
\newtheorem{subcase}{Subcase}
\newtheorem{step}{Step}
\newtheorem{summary}{Summary}

%\newtheorem{subhypothesis}{Sub-Hypothesis}
%>\newtheorem{theorem}{Theorem}
%>\newtheorem{lemma}{Lemma}
%>\newtheorem{remark}{Remark}
%>\newtheorem{corollary}{Corollary}
%>\def\thm@space@setup{\thm@preskip=7\p@ \thm@postskip=7\p@}
%>\thm@headpunct{}
%>%
%>\newtheoremstyle{plain}% Numbered
%>      {9pt}% Space above
%>      {9pt}% Space below
%>      {\normalfont}% Body font
%>      {}% Indent amount
%>      {\itshape}% Theorem head font
%>      {}% Punctuation after theorem head
%>      {\newline}% Space after theorem headi
%>      {}% Theorem head spec (can be left empty, meaning `normal')
%>%
%>\renewenvironment{proof}[1][\proofname]{%
%>  \par%
%>  \pushQED{\qed}%
%>  \normalfont \topsep9\p@\@plus6\p@\relax
%>  \noindent\ignorespaces{\itshape#1}\newline%\itshape
%>}{%
%>  \popQED\endtrivlist\@endpefalse
%>}
%\input \Stypath/njdtheorem.sty%
% \RequirePackage{\Stypath amsthm}
% \newtheoremstyle{WBstyleone}
%   {6\p@} % Space above
%   {6\p@} % Space below
%   {\normalfont} % Body font
%   {\z@} % Indent amount
%   {\bfseries} % Theorem head font
%   {.} % Punctuation after theorem head
%   {5\p@} % Space after theorem head
%   {} % Theorem head spec (can be left empty, meaning `normal')
% 
% \renewenvironment{proof}[1][\proofname]{\par
%   \pushQED{\qed}%
%   \normalfont \topsep6\p@\@plus6\p@\relax
%   \trivlist
%   \item[\hskip\labelsep
%         \itshape
%     #1\@addpunct{.}]\ignorespaces
% }{\vspace*{-\baselineskip}%
%   \popQED\endtrivlist\@endpefalse
% }
% 
% \newcounter{ProofofTheorem}
% \setcounter{ProofofTheorem}{1}
% \def\theProofofTheorem{\arabic{ProofofTheorem}}
% 
% \newenvironment{ProofofTheorem}[1][Proof of Theorem]{\par
%   \pushQED{\qed}%
%   \normalfont \topsep6\p@\@plus6\p@\relax
%   \trivlist
%   \item[\hskip\labelsep\itshape#1 \theProofofTheorem\refstepcounter{ProofofTheorem}\@addpunct{.}]\ignorespaces
% }{\vspace*{-\baselineskip}%
%   \popQED\endtrivlist\@endpefalse
% }
% 
% \newcounter{ProofofProposition}
% \setcounter{ProofofProposition}{1}
% \def\theProofofTheorem{\arabic{ProofofProposition}}
% 
% \newenvironment{ProofofProposition}[1][Proof of Proposition]{\par
%   \pushQED{\qed}%
%   \normalfont \topsep6\p@\@plus6\p@\relax
%   \trivlist
%   \item[\hskip\labelsep\itshape#1 \theProofofProposition\refstepcounter{ProofofProposition}\@addpunct{.}]\ignorespaces
% }{\vspace*{-\baselineskip}%
%   \popQED\endtrivlist\@endpefalse
% }
% 
% %%29Nov17%%
% \newif\ifMS@RoundPunctuation%
% \global\MS@RoundPunctuationfalse%
% \def\MSRoundPunctuation{\global\MS@RoundPunctuationtrue}%
% 
% \newtheoremstyle{WBstyletwo}
%   {6\p@} % Space above
%   {6\p@} % Space below
%   {\normalfont} % Body font
%   {\z@} % Indent amount
%   {\bfseries} % Theorem head font
%   {.} % Punctuation after theorem head
%   {5\p@} % Space after theorem head
%   %%{\thmname{#1}\thmnumber{ #2}\thmnote{. #3}} % Theorem head spec (can be left empty, meaning `normal')%%29Nov17%%
%   {\thmname{#1}\thmnumber{ #2}\ifMS@RoundPunctuation\thmnote{ (#3)}\else\thmnote{. #3}\fi} % Theorem head spec (can be left empty, meaning `normal')
%   
% \newtheoremstyle{WBstylethree}
%   {6\p@} % Space above
%   {6\p@} % Space below
%   {\normalfont} % Body font
%   {\z@} % Indent amount
%   {\bfseries} % Theorem head font
%   {.} % Punctuation after theorem head
%   {5\p@} % Space after theorem head
%   {} % Theorem head spec (can be left empty, meaning `normal')
% 
% \theoremstyle{WBstyleone}
% \newtheorem{theorem}{Theorem}
% \newtheorem{lemma}{Lemma}
% \newtheorem{corollary}{Corollary}
% \newtheorem{result}{Result}
% \newtheorem{proposition}{Proposition}
% 
% \theoremstyle{WBstyletwo}
% \newtheorem{remark}{Remark}
% \newtheorem{example}{Example}
% \newtheorem{eexample}{Example}
% \newtheorem{assumption}{Assumption}
% 
% \theoremstyle{WBstylethree}
% \newtheorem{definition}{Definition}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% THEOREM ENVIRONMENT Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% ACKNOWLEDGEMENTS Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%%%%%%%%%%% Acknowledgements %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcount\appnumcnt%
\newif\ifacksec%
\newif\ifappsection%
\newcounter{appnumcnt}%

\renewenvironment{appendix}{\begingroup\parindent=0pt\parskip=0pt%
  \setcounter{section}{0}
  \setcounter{subsection}{0}
  \setcounter{subsubsection}{0}
  \setcounter{table}{0}
  \setcounter{figure}{0}
  %\def\thesection{APPENDIX\space\@Alph\c@section}%%PSK%%07Sep17%%
  \def\@sectioncntformat##1{\appendixname\space{\csname ##1numfont\endcsname\csname the##1\endcsname.\hspace*{2.5bp}}\nobreakspace}
  \def\thesection{\Alph{section}}
  \def\thesubsection{\thesection.\arabic{subsection}}
  \def\thesubsubsection{\thesubsection.\arabic{subsubsection}}
  \def\thelemma{\Alph{section}.\arabic{lemma}}%%10Nov17%%
}{\par\endgroup}%

\newenvironment{bm}[1][]%
{\begingroup%%
\def\appnum##1{##1\protect\refstepcounter{appnumcnt}}\def\@currentlabel{\Alph{appnumcnt}}%%%%% added by Reydurz 09/30/2016
\ifthenelse{\equal{#1}{Acknowledgement}}{\undefined_use_uppercase_heading%
\def\bmfont{\fontsize{8pt}{10}\selectfont}%
\par\addvspace{18.2pt}%
\vbox{\raggedcenter\fontsize{8pt}{10}\selectfont\MakeUppercase{#1}}\par%
\nointerlineskip\nobreak\vskip9.7pt\nobreak%
}{%
\ifthenelse{\equal{#1}{Acknowledgements}}{\undefined_use_uppercase_heading%%
\def\bmfont{\fontsize{8pt}{10}\selectfont}%
\par\addvspace{18.2pt}%
\vbox{\raggedcenter\fontsize{8.5pt}{10}\selectfont\MakeUppercase{#1}}\par%
\nointerlineskip\nobreak\vskip9.7pt\nobreak%
\nobreak\bmfont\noindent\ignorespaces%
}{
\ifthenelse{\equal{#1}{AUTHORS' BIOGRAPHIES}}{\undefined_use_authbio_tag%
\def\bmfont{\fontsize{8pt}{10}\selectfont}%
\par\addvspace{18pt}%
\vbox{\raggedcenter\fontsize{8pt}{10}\selectfont\MakeUppercase{#1}}\par%
\nointerlineskip\nobreak\vskip18.7pt\nobreak%
}{\ifthenelse{\equal{#1}{AUTHOR'S BIOGRAPHY}}{\undefined_use_authbio_tag%
\def\bmfont{\fontsize{8pt}{10}\selectfont}%
\par\addvspace{19pt}%
\vbox{\raggedcenter\fontsize{8pt}{10}\selectfont\MakeUppercase{#1}}\par%
\nointerlineskip\nobreak\vskip18.7pt\nobreak%
}{%
\def\bmfont{\normalsize\selectfont}%
\appsectiontrue%
\section*{#1}%
\pdfbookmark[1]{#1}{unnumbered}%
}}}}%
%\nobreak\reset@font\bmfont\noindent\ignorespaces%
\setcounter{table}{0}
\setcounter{figure}{0}
\setcounter{equation}{0}
 \setcounter{section}\z@
  \setcounter{subsection}\z@
  \setcounter{subsubsection}\z@
  \setcounter{figure}\z@
  \setcounter{table}\z@
  \setcounter{equation}\z@
  \gdef\thefigure{\@Alph\c@section\arabic{figure}}%
  \gdef\thetable{\Alph{appnumcnt}\arabic{table}}%
  \renewcommand{\theequation}{\Alph{appnumcnt}\arabic{equation}}%
\renewcommand\thesection      {\Alph{appnumcnt}.\arabic{section}}
\renewcommand\thesubsection   {\thesection.\@arabic\c@subsection}
\renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection}
\renewcommand\theparagraph    {\thesubsubsection.\@arabic\c@paragraph}
\renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph}
}{%
%\appendix\par%
\reset@font\bmfont\endgroup%
}%

\def\appendix{%
\figcount=1%
\tabcount=1%
\floatctr=0%
  \setcounter{section}\z@
  \setcounter{subsection}\z@
  \setcounter{subsubsection}\z@
  \setcounter{figure}\z@
  \setcounter{table}\z@
  \setcounter{equation}\z@
  \stepcounter{section}{}
  \gdef\thefigure{\@Alph\c@section.\arabic{figure}}%
  \def\tabfigsuffix{\@Alph\c@section.\the\floatctr}%
  \@addtoreset{equation}{section}%
  \gdef\theequation{\@Alph\c@section.\arabic{equation}}%
}%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% ACKNOWLEDGEMENTS Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% SUPPORTING INFORMATION Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\newskip\supskip%
\supskip=20.2pt%

\newcount\supinfocnt%
\global\supinfocnt=0%

\def\suppinfohead#1{\removelastskip\vskip\supskip{\suppinfoheadfont\uppercase{#1}\par\vspace*{6.1\p@}}}%
\def\suppinfo#1{\supinfocnt=1\gdef\@suppinfo{{\suppinfofont#1\par}}}%\suppinfo{}%
\def\suppinfocaption#1{\smallskip{\suppinfocaptionfont#1}}%
\def\suppinfotext{Additional supporting information may be found online in the Supporting Information section at the end of this article.}
\newbox\suppinfo@boxa
\newdimen\suppinfo@dima
\gdef\printsuppinfo{\endgraf\begingroup\parindent=0pt%
\reset@font\normalsize%\setbox\suppinfo@boxa\hbox{\@suppinfo}%
\vspace*{0.6pt}%
    \section*{Supporting Information}%
    \vskip-6.5pt%
    \suppinfotext\par
 % \fi%
\endgroup\global\supinfocnt=0}%

\def\pputsuppinfo{\section*{SUPPORTING INFORMATION}
\reset@font\normalsize%
% Additional Supporting Information may be found online in the supporting information tab for this article.
Additional supporting information may be found online in the Supporting Information section at the end of the article.}%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% SUPPORTING INFORMATION Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\RequirePackage[authoryear]{natbib}

\def\@bibauthor{}
\def\@bibjournal{}
\def\@bib@Z@journal#1{}
\def\bibfont{\fontsize{8}{10}\selectfont}

\AtBeginDocument{\let\cite\citet}	
% 
% \let\bibfont\bibliofont



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Boxtext Starts %%
%% by LN %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\RequirePackage[breakable,hooks]{\commontemplatepath tcolorbox}%LN

\def\bboxtext{\begin{tcolorbox}[%%
                  boxsep=12pt,
                  breakable,
                  left=0pt,
                  right=0pt,
                  top=0pt,
                  bottom=0pt,
                  arc=0pt,
                  outer arc=0pt,
                  boxrule=5pt,
                  colback=white,
                  colframe=black!10]}
\def\eboxtext{\end{tcolorbox}\removelastskip\vskip14.9pt}%  

\def\bfeaboxtext{\removelastskip\vskip12pt\begin{tcolorbox}[%%
                  boxsep=12pt,
                  breakable,
                  left=0pt,
                  right=0pt,
                  top=0pt,
                  bottom=0pt,
                  arc=0pt,
                  outer arc=0pt,
                  boxrule=5pt,
                  colback=white,
                  colframe=black!20]}
\def\efeaboxtext{\end{tcolorbox}\removelastskip\vskip12pt}%  

\newfloat{keybotext}[]

\def\feaboxheaddefns#1{\begingroup%
%\removelastskip\vskip6pt%
\raggedright#1\par%
\removelastskip\vskip6pt%
\endgroup}%

\newbox\keyboxte%
\newenvironment{keyboxtext}{\begingroup%
\global\setbox\keyboxte\vbox\bgroup\removelastskip\bboxtext%
}{\eboxtext\egroup\afterpage{\global\csname @topnum\endcsname 0\global\csname @botnum\endcsname 0\begin{figure}\unvcopy\keyboxte\end{figure}}\endgroup}


\newcounter{boxcnt}%
\newcommand\boxsection[1]{\begingroup\vskip2pt%
\refstepcounter{boxcnt}%
\vbox{{\textcolor{black!75}{\boxheadfont BOX \theboxcnt.}}\quad {\boxtitlefont#1}}\par%
\removelastskip\vskip4pt%
\endgroup}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Boxtext Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% PAGE STYLES Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Opening Page Style
\def\@authormark{}%
\def\authormark#1{\gdef\@authormark{\def\etal{{\textsc{et al}}}\def\and{{\textsc{and\space}}}{#1}}}%
\def\@titlemark{}%
\def\titlemark#1{\gdef\@titlemark{#1}}
\def\etal{\textit{et al.}}
%%
\def\gendefns{\parindent=0pt\leftskip=0pt\rightskip=0pt\parskip=0pt}%

\def\ps@headings{%
  \def\@oddfoot{}%
  \def\@evenfoot{}%
  \def\@oddhead{\gendefns%
\hbox to \textwidth{\reset@font\runningfootfont{AI MAGAZINE}\hfill\thepage}}%
  \def\@evenhead{\gendefns%
\hbox to \textwidth{\reset@font\runningfootfont\thepage\hfill{AI MAGAZINE}}}%
  \let\@mkboth\markboth%
}%
%
\def\doiheadtext#1{\gdef\@DOI@text{#1}}\doiheadtext{DOI:\nobreakspace{}}%
%
\def\historykern#1{\gdef\history@kern{#1}}\historykern{\nobreakspace{}\kern.5pt}
\def\@dummy@received{\textcolor{red}{Received:\history@kern{}00\history@kern{}Month\history@kern{}0000}}%
\def\@dummy@revised{\textcolor{red}{Revised:\history@kern{}00\history@kern{}Month\history@kern{}0000}}%
\def\@dummy@accepted{\textcolor{red}{Accepted:\history@kern{}00\history@kern{}Month\history@kern{}0000}}%
\def\@dummy@pubdate{\textcolor{red}{Published\history@kern{}on:\history@kern{}00\history@kern{}Month\history@kern{}0000}}%
\def\historydates#1{\gdef\@history@dates{#1}}%
\historydates{{\titlepageheadfont%
%  \ifx\@received\@empty\@dummy@received\else\@received\fi\historydatesvertbar%
%  \ifx\@revised\@empty\@dummy@revised\else\@revised\fi\historydatesvertbar%
%  \ifx\@accepted\@empty\@dummy@accepted\else\@accepted\fi\historydatesvertbar%
%  \ifx\@pubdate\@empty\@dummy@pubdate\else\@pubdate\fi%
  \ifx\@received\@empty\else\@received,\space\fi%
  \ifx\@revised\@empty\else\@revised,\space\fi%
  \ifx\@accepted\@empty\else\@accepted.\space\fi%
  \ifx\@pubdate\@empty\else\historydatesvertbar\@pubdate\fi%
}}%
%
\def\head@titlepage@def#1#2{\vbox{%
  \journalinformationbox\par\vspace*{11.3\p@}%
  \hbox to \textwidth{#1\dummyalphabet}\par\vspace*{2.5\p@}%
  \@headfootrule\par\vspace*{9\p@}%
  \smash{{\titlepageheadfont\@DOI@text#2}}\par\vspace*{9\p@}%
%  \vspace*{-2.5\p@}%
  \vspace*{9\p@}%logo_space_chance
  \smash{\hbox to \textwidth{\hfill\rhlogo}}\par%
}}%
%
%\newskip\foot@titlepage@raise@skip\global\foot@titlepage@raise@skip-7\p@%%Commentfootnotedown8thMarch%%
\newskip\foot@titlepage@raise@skip\global\foot@titlepage@raise@skip23\p@%
%
\def\FPFht#1{\gdef\@firstpage@foot@height{#1}}\FPFht{4\baselineskip}
\def\foot@titlepage@def#1{%
  \global\setbox\foot@titlepage@boxa\hbox{\foot@vertbar\ifeLocatorid\hbox{\oddELocatthepagedef}\else\foot@pagenumber@align{\hss\thepagedef}\fi}%
  \foot@titlepage@dima\textwidth%
  \advance\foot@titlepage@dima-\wd\foot@titlepage@boxa%
  \global\setbox\foot@titlepage@boxb\vbox{%
    \begingroup%
    \begin{minipage}[b]{\textwidth}%
      \strut\par\vspace*{-3\baselineskip}%
      \@legalstatement%
      \smash{\@headfootrule}\par\vspace*{-3.1\p@}%\vspace*{-4\p@}%
      \hbox to \foot@titlepage@dima{#1\dummyalphabet}\par%
    \end{minipage}%
    \hspace*{-\wd\foot@titlepage@boxa}%
    \unhbox\foot@titlepage@boxa%
    \endgroup%
  }\wlog{FPFht=\the\ht\foot@titlepage@boxb}%
  \protected@write\@auxout{}{\string\FPFht{\the\ht\foot@titlepage@boxb}}%
  \ifcategoryone\advance\foot@titlepage@raise@skip by -1\p@\fi%
  \ifcategorytwo\advance\foot@titlepage@raise@skip by -1\p@\fi%
  \smash{\raisebox{\foot@titlepage@raise@skip}{\copy\foot@titlepage@boxb}}%
}%
%

%\gdef\QJshrtjnlname{QJR Meteorol Soc}%

\newif\ifsupplementary%
\supplementaryfalse%

\def\volseparator{{:}}%
\def\yearseparator{;}
%\def\samshorttitle{Astron. Nachr. /AN}%
\def\printpubyear#1{\gdef\print@pubyear{#1}}\printpubyear{\pubinfo}%
\def\printpagerange#1{\gdef\print@pagerange{#1}}\printpagerange{\pagerangeinfo}%
%\def\printjournaltitle#1{\gdef\print@journaltitle{#1}}\printjournaltitle{\textit{\@jname}}%
\def\printjournaltitle#1{\gdef\print@journaltitle{#1}}\printjournaltitle{\textit{\shrtjnlname}}%
\def\printjournalvolume#1{\gdef\print@journalvolume{#1}}\printjournalvolume{{\journalvolume}}%
\def\printjournalissue#1{\gdef\print@journalissue{#1}}\printjournalissue{\textbf{(\journalissue):}}%Updated by Senthil

\def\shorttitdot{.}%%%%%23March
\def\runningfootdot{.}%%%%23March
\def\journalinformation#1{\gdef\journal@information{#1}}%
\journalinformation{%
\ifIssue\relax
  \print@journaltitle%
  \shorttitdot\nobreakspace{}\print@pubyear%
  \yearseparator%
\ifsupplementary%
\print@journalvolume\space\textbf{(\issno)}\else%
\print@journalvolume\fi\volseparator%
\ifeLocatorid\@Elocator\else%
 \print@pagerange\fi\runningfootdot%
\else%
\ifEV\relax%
  \print@journaltitle%
  \shorttitdot\nobreakspace{}\print@pubyear%
  \yearseparator%
 \ifeLocatorid\@Elocator\else\print@pagerange\fi\runningfootdot%
\else%
  \print@journaltitle%
  \shorttitdot\nobreakspace{}\print@pubyear%
  \yearseparator%
 \ifeLocatorid\@Elocator\else\print@pagerange\fi\runningfootdot%
\fi\fi}%

\def\firstpage#1{\gdef\@firstpage{#1}}\firstpage{}
\def\lastpage#1{\gdef\@lastpage{#1}}\lastpage{}
\def\jtitle#1{\gdef\@jtitle{#1}}\jtitle{}
\def\slugfont{\fontsize{8}{8}\selectfont}
\def\oddhead@titlepage@info{}%
\def\evenhead@titlepage@info{}%
%
\def\copyinfo#1{\gdef\@copyinfo{#1}}\copyinfo{}
\def\oddfoot@titlepage@info{}%
\def\evenfoot@titlepage@info{}%

%\def\copyrightmsg{$\copyright$\space\copyrightyear\space Association for the Advancement of Artificial Intelligence. All rights reserved.}%
\def\copyrightmsg{The Authors.\space Association for the Advancement of Artificial Intelligence.}%

\newbox\doibox%
\gdef\doiinformation{\begingroup%\global\let\DoiIncluded=Y%
\setbox\doibox=\hbox{doi:10.1002/aaai.\artid}%
\unhbox\doibox%
\endgroup}%

\newcount\endcurrentpageno%

\gdef\bpage{\getpagerefnumber{abeginpage}}%
\gdef\epage{\getpagerefnumber{aendpage}}%

\def\ps@titlepage{%
\vglue-40pt%
  \def\@oddfoot{\gendefns%
\vbox to 25pt{\reset@font\runningfootfont%
\hbox to \textwidth{\hfill\textit{AI Magazine.} 00(000): \bpage--\epage; \doiinformation\hfill}\par%
\nointerlineskip\vskip3pt%
\hbox to \textwidth{\copyrightmsg\hfill}}}%
  \def\@evenfoot{\gendefns%
\vbox to 25pt{\reset@font\runningfootfont%
\hbox to \textwidth{\hfill\textit{AI Magazine.} 00(000): \bpage--\epage; \doiinformation\hfill}\par%
\nointerlineskip\vskip3pt%
\hbox to \textwidth{\copyrightmsg\hfill}}}%
  \def\@oddhead{}%
  \def\@evenhead{\gendefns}%
  \let\@mkboth\markboth%
}%

\pagestyle{headings}
\pagenumbering{arabic}
\sloppy
\frenchspacing
%\flushbottom

%%% special parameters for TeX
\adjdemerits=100
\linepenalty=100
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% PAGE STYLES Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Author Biography Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%  \begin{wrapfigure}[12]{r}[34pt]{5cm} <figure> \end{wrapfigure}
%%  [number of narrow lines] {placement} [overhang] {width of figure}
%%
\newif\ifbiographypresent%
\biographypresentfalse%

\newcount\aubioexistcnt%
\global\aubioexistcnt=0\relax%

\newenvironment{authbio}[1]{%
\global\aubioexistcnt=1\relax%
  \begingroup\global\biographypresenttrue%
  \parindent=0pt%
  \if!#1!\else%
    \addvspace{13pt}%
    \vbox{\reset@font\sectionfont\MakeUppercase{#1}}\par%
    \nobreak\addvspace{14.5pt}%
  \fi%
   \global\advance\biographycount1%
  \normalsize\normalfont\nobreak\noindent\ignorespaces%
}{\par\addvspace{13pt}\endgroup}%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Author Biography Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\if@TwoColLayout\RequirePackage{\Stypath LWcuted}\fi%
\newif\ifpagebody%

\newcount\biographycount\biographycount0%
\newcount\biographyTEMPcount\biographyTEMPcount0%
\newcount\TEMPbiographycount\TEMPbiographycount0%
\newif\ifbiographypresent%
\long\def\biography#1{\begingroup\global\biographypresenttrue%
   \expandafter\protected@xdef\csname biography\the\biographycount\endcsname{#1}%
   \global\advance\biographycount1%
\endgroup}%

\def\authbioname{}%
\def\authbioname{}%

\newenvironment{frameenv}{%%20Mar18_PSK%%
\begin{tcolorbox}[boxsep=6pt,breakable,%
      left=0pt,right=0pt,top=0pt,bottom=0pt,%
      arc=0pt,outer arc=0pt,boxrule=1pt,%
      colback=white]%
}{%
      \end{tcolorbox}%
}%

%%13Feb18_PSK%%
\def\biographybreak#1{\gdef\biography@break{#1}}\biographybreak{}%
\def\biobreak@print{\ifx\biography@break\undefined\else\biography@break\biographybreak{}\fi}%
\def\bbreak@defn{\biographybreak{\newpage\vspace*{-20pt}}}%
\def\biobreak{\protect\bbreak@defn}%

\gdef\bbiography{\begingroup%
\ifbiographypresent%
   \addvspace{18pt}%
   \global\TEMPbiographycount\biographycount%
   \global\advance\TEMPbiographycount-1%
   \ifnum\TEMPbiographycount=1%
   \begin{authbio}{}\vspace*{6pt}%
   \begin{frameenv}
      \ignorespaces\noindent\csname biography0\endcsname\par%
   \end{frameenv}
   \end{authbio}%
   \else%
   \begin{authbio}{}\vspace*{6pt}%
      \@whilenum\biographyTEMPcount<\TEMPbiographycount\do{%
   \begin{frameenv}
      \ignorespaces\noindent\csname biography\the\biographyTEMPcount\endcsname\par%
   \end{frameenv}
\vspace*{12pt}%
      \global\advance\biographyTEMPcount1%
     }%
   \begin{frameenv}
      \ignorespaces\noindent\csname biography\the\biographyTEMPcount\endcsname\par%
   \end{frameenv}
   \end{authbio}%
   \fi%
\fi%
\endgroup}%
%%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Biography Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% WIDE EQUATION Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\newdimen\eqmovdim%
\eqmovdim\columnsep%
\advance\eqmovdim by 2pt%

\def\wideeqnspace#1#2{%
  \gdef\@wideeqnabovespace{#1}%
  \gdef\@wideeqnbelowspace{#2}%
}
\def\@wideeqnabovespace{}%
\def\@wideeqnbelowspace{}%
\newif\if@weq@rule@top\global\@weq@rule@toptrue
\newif\if@weq@rule@bottom\global\@weq@rule@bottomtrue

\def\topformularule{\if@weq@rule@top\par\noindent\hspace{\eqmovdim}\hspace{\columnhsizevalue}\vrule width\columnhsizevalue height.4pt depth\z@\par\noindent\fi}
\def\botformularule{\if@weq@rule@bottom\par\noindent\hspace{\eqmovdim}\hspace{\columnhsizevalue}\hbox to \textwidth{\vrule width\columnhsizevalue height.4pt depth\z@\hfill}\par\fi}

\def\Righttopformularule{\if@weq@rule@top\par\noindent\vrule width\columnhsizevalue height.4pt depth\z@\par\noindent\fi}
\def\Rightbotformularule{\if@weq@rule@bottom\par\noindent\hbox to \textwidth{\vrule width\columnhsizevalue height.4pt depth\z@\hfill}\par\fi}

\def\righteqskip{0pt}%

\newdimen\ruledimen%
\ruledimen=\columnhsizevalue%
\advance\ruledimen by \columnsep%%

\newenvironment{wideequation}[3][\relax]{\begingroup\parindent=0pt\parskip=0pt%
\ifthenelse{\equal{#2}{right}}{%
\def\righteqskip{\ruledimen}%
\let\topformularule\Righttopformularule%
\let\botformularule\Rightbotformularule}{}%
\ifthenelse{\equal{#1}{top}}{%
\global\@weq@rule@topfalse%
\global\@weq@rule@bottomtrue%
\def\@wideeqnabovespace{-8pt}%
\gdef\@wideeqnbelowspace{6.8pt}%
}{%
\ifthenelse{\equal{#1}{bottom}}{%
\global\@weq@rule@toptrue%
\global\@weq@rule@bottomfalse%
\gdef\@wideeqnabovespace{10.8pt}%
\gdef\@wideeqnbelowspace{-8pt}%
}{%
\global\@weq@rule@toptrue%
\global\@weq@rule@bottomtrue%
\gdef\@wideeqnabovespace{10.8pt}%
\gdef\@wideeqnbelowspace{6.8pt}}}%
\hskip-\righteqskip\begin{minipage}[!h]{\textwidth}%%\nolinenumbers
\par\addvspace{12pt plus2pt minus2pt}\ifx\@wideeqnabovespace\@empty\else\vspace*{\@wideeqnabovespace}\fi%
\topformularule#3}%
{\botformularule%
\ifx\@wideeqnbelowspace\@empty\else\vspace*{\@wideeqnbelowspace}\fi\par\addvspace{12pt plus2pt}\end{minipage}%
\gdef\@wideeqnabovespace{0pt}%
\gdef\@wideeqnbelowspace{0pt}%
\endgroup}%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% WIDE EQUATION Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\hoffset-72\p@%
\voffset-81.75\p@%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% TIFF Figures Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
% Arguments to showtiff are: file-name, desired width, columns, rows.
% The height is computed from the widths so as to preserve the aspect ratio.
% The number of rows and columns is *only* used to compute height from width.
% The number of columns and rows in the TIFF image may be found using TIFFTAGS.
% TeX cannot read the binary TIFF file to extract the dimensions for itself.
\newdimen\dwidth
\newdimen\dheight
\newcount\ncolumns
\newcount\nrows
\def\showtiff#1#2#3{
\dwidth=#2\dheight=#3
\edef\width{\number\dwidth}
\edef\height{\number\dheight}
{\vbox to \dheight{\vfill\hbox to \dwidth{
\special{insertimage: \@artpath/#1 \width \space \height}\hfill}}}}
% The above assumes that the X and Y resolution are the same
% If they are not, then change the aspect ratio to suit
% Make <height> = <true height> * <x resolution> / <y resolution>
% Use TIFFTAGS to find the x and y resolution (if specified)
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% TIFF Figures Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% DOI-Links Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% From doi.sty %%
%
\DeclareRobustCommand{\doitext}{\textsc{doi}: }%
%
%% the meat of the code
%% the first command opens a group, and changes a few catcodes.
\newcommand*{\DOI}{%
  \begingroup
  \lccode`\~=`\#\relax
  \lowercase{\def~{\#}}%
  \lccode`\~=`\_\relax
  \lowercase{\def~{\_}}%
  \lccode`\~=`\<\relax
  \lowercase{\def~{\textless}}%
  \lccode`\~=`\>\relax
  \lowercase{\def~{\textgreater}}%
  \lccode`\~=0\relax
  \catcode`\#=\active
  \catcode`\_=\active
  \catcode`\<=\active
  \catcode`\>=\active
  \doitext\@mydoi
}
%%
%% this is the actual command which processes the argument, with the catcodes
%% set in the previous command
%% it closes the group, and spits out the url.
\def\@mydoi#1{%
  \let\#\relax
  \let\_\relax
  \let\textless\relax
  \let\textgreater\relax
  \edef\x{\toks0={{#1}}}%
  \x
  \edef\#{\@percentchar23}%
  \edef\_{_}%
  \edef\textless{\@percentchar3C}% instead of {\string<} for Apple
  \edef\textgreater{\@percentchar3E}% instead of {\sting>} for Apple
  \edef\x{\toks1={\noexpand\href{http://dx.doi.org/#1}}}%
  \x
  \edef\x{\endgroup\the\toks1 \the\toks0}%
  \x
}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% DOI-Links Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% WATERMARK Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%\font\WMarkfont=HelNB at 50pt
\if@watermarkon
\RequirePackage{\commontemplatepath eso-pic}
\definecolor{wmgray}{cmyk}{0.0,0.0,0.0,0.20}
\def\watermarktext{%
\put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){%
\makebox(0,0){\rotatebox{55}{\textcolor{wmgray}%
{{}}}}}}
\AtBeginDocument{\AddToShipoutPicture{%
\setlength{\@tempdimb}{.6\paperwidth}%
\setlength{\@tempdimc}{.4\paperheight}%
\setlength{\unitlength}{1pt}%
\watermarktext}}%
\fi
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% WATERMARK Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% MATH Settings Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\RequirePackage{amsmath,amsfonts}
\let\SplitEq\relax%

\everymath{%
  \fontdimen16\textfont2=1.5pt%
  \fontdimen17\textfont2=1.5pt%
}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% MATH Settings Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% DRAFTRULES Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\newdimen\FRMleftskip%
\newdimen\jheaderskip
\jheaderskip=-1in
\advance\jheaderskip-\oddsidemargin
%
\if@draftruleson
\RequirePackage{showframe}
\newdimen\jheaderruleskip\jheaderruleskip\jheaderskip\advance\jheaderruleskip20mm%
\newdimen\jheaderrulelength\jheaderrulelength\paperwidth\advance\jheaderrulelength-40mm%
\fi%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% DRAFTRULES Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Article Citation Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\def\Citationfonti{\fontfamily{\sfdefault}\if@exactptsize\fontsize{7.3}{8.5}\else\fontsize{7.5}{8.5}\fi\fontseries{l}\selectfont}
\def\Citationfontii{\fontfamily{\sfdefault}\if@exactptsize\fontsize{7.3}{8.5}\else\fontsize{7.5}{8.5}\fi\fontseries{m}\selectfont}
%
\def\PrintCitation{\undefined%
  \par\parindent=0pt%
  \vskip6pt%
  \ovalboxtextwidth\textwidth%
  \boxedtextsep=5pt%
  \advance\ovalboxtextwidth-2\boxedtextsep%
  \psframebox[framearc=.3, linewidth=.5pt, linecolor=Black, framesep=\boxedtextsep]%
  {\begin{minipage}{\ovalboxtextwidth}%
    \Citationfonti%
    {{\Citationfontii\@DOI}\par
    \textsb{Cite this article as:}\ \@authormarkforcite:\ {\Citationfontii\s@title.}\ \textit{\@jname}\ \@jyear\ifx\journalvolume\empty\else\ \textsb{\journalvolume}\fi\ifx\@artid\empty\else:\@artid\fi.}%
  \end{minipage}%
  \par}%
  \global\let\@authormark\@empty%
}%
%
\def\Publogo{%
  \vfill%
  \rightline{\@jpubsubmsnlogo}%
}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Article Citation Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Figure/Table Flag Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% LINE NUMBER Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\newbox\@linebox%
\newbox\@llinebox%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Grapical Abstract Image Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\newbox\GnA@boxa
\newdimen\GnA@dima
\newdimen\GnA@dimb
\newdimen\GnA@dimc
%
\def\GrapicalAbstractImage#1{%
  \setbox\GnA@boxa\hbox{#1}%
  \GnA@dimc=\wd\GnA@boxa%
  \GnA@dima=\ht\GnA@boxa%
  \advance\GnA@dima by \dp\GnA@boxa%
  \divide\GnA@dima by 10%
  \GnA@dimb=\GnA@dima%
  \divide\GnA@dimb by 65536%
  \begin{wrapfigure}[\GnA@dimb]{r}[\wrapoverhang]{\GnA@dimc}%
  %\if@font@stix\vspace*{-1.45\baselineskip}\else\vglue-23pt\fi%
  \unhbox\GnA@boxa%
  \end{wrapfigure}%
}%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Grapical Abstract Image Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Capturing Page Numbers Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\newwrite\@xmlpage
\openout\@xmlpage=\jobname.pag
\newcounter{spagecounter}
\newcounter{lpagecounter}
\AtBeginDocument{\setcounter{spagecounter}{\c@page}}
\AtEndDocument{%
%  \Enddocumenttext%
  \setcounter{lpagecounter}{\c@page}
  \addtocounter{lpagecounter}{-1}
}%
%
%\def\Enddocumenttext{\ifbackmatter\else\Warning: Include Backmatter tag in your file\fi}%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Capturing Page Numbers Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% PDF Cumstom Properties - JQA Starts %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\def\proclevel#1{\gdef\@proclevel{#1}}%
\def\@proclevel{3}%
\def\jdoi#1{\gdef\@jdoi{#1}}%%
\jdoi{10.1002/XXXX}%= unique per title
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% PDF Cumstom Properties - JQA Ends %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\RequirePackage{\template@path dcolumn}%
\RequirePackage{\template@path tabularx}%% COMPULSARILY HAS TO BE INPUTTED TO USE \tabpara
\RequirePackage{array}%% COMPULSARILY HAS TO BE INPUT TO USE \tabpara
\RequirePackage{\template@path colortbl}%
\RequirePackage{\template@path warpcol}%

\gdef\divname{}%
\def\FigPath{}%

\graphicspath{{m:/Journals/wiley_jnls/XML-Templates/NJD/newdesign/ops/}%
  {\FigPath}%
{\opsfilepath}}

\def\partLevel#1{}%

\newif\ifnoneedonlincolor%
\noneedonlincolorfalse%

\RequirePackage{xcolor}%

\gdef\journalvolume{000}
\gdef\journalissue{(0)}

%\input NJDgennew.sty

%\global\NJDjournalstrue%
%\global\LatexEnvJournalstrue%

\def\smalltriangle{\bgroup\raise1pt\hbox{\fontsize{8}{0}\selectfont$\bigtriangleup$}\,\egroup}%

\def\bkauthrule{\hspace*{5pt}\rule{.5\p@}{7.5\p@}\hspace*{5pt}}

\newif\ifpagebody%

\newif\ifborderrule%
\gdef\orcidlogopath{}%

\newcount\orcidlogocnt%

\gdef\orcidquerylower{20}%

\gdef\orcidlogoquery{\ifnum\orcidlogocnt=1\relax\fi}%

\gdef\orcidlogo{}%

\definecolor{TabColHColor}{gray}{0.7}%

\def\mathbscr#1{\boldsymbol{\mathscr{#1}}}%%28Dec17%%

\newif\ifoldarticlehowtocite%
\oldarticlehowtocitefalse%

%%24Jan18%%
%%macros for reverse cedil
\def\rotf#1{\hbox to\wd#1{\hskip\wd#1\rotstart{-1 1 scale}\box#1\hss}\rotfinish}%

\def\revc#1{\setbox1=\hbox{\char24}\setbox0\hbox{#1}%
{\ooalign{{\kern0pt\hbox to\wd0{\hfil\rotf{1}\hfil}}\crcr\noalign{\kern-0.85em\nointerlineskip\vskip1.6pt}\unhbox0}}}%

\def\refrevcedil#1{\setbox1=\hbox{\char24}\setbox0\hbox{#1}%
{\ooalign{\raise0.65pt\hbox{{\kern0.5pt\hbox to\wd0{\hfil\rotf{1}\hfil}}}\crcr\unhbox0}}}%

\def\abbsection{\textbf{Abbreviations:}}%

%%%%%%%%%%abbreviations%%%%%%%%%%%%%

\def\@abbrev{}%
\def\abbrev#1{\begingroup%
\gdef\@abbrev{\parindent=0pt\parskip=0pt%
\footnotetext{\reset@font\abbrevfont{\abbsection\space#1}}\par}%
\endgroup}%

\newcount\abbrevcnt%
\abbrevcnt=1%
\newcount\fnotecount\fnotecount=0%
\newbox\abbrevbox%
\newenvironment{abbreviations}{%
  \begingroup%
  \parskip=0pt\parindent=0pt%
  \fnotecount=0%
  \StepUpCounter{\fnotecount}%
  \def\@makefnmark{}%
  \fboxsep=0pt\parindent=0pt%
  \setbox\abbrevbox=\vbox\bgroup%%
 \ifnum\abbrevcnt=1\reset@font\abbrevfont\fi%
  \removelastskip\nobreak\noindent%
}{%
  \egroup%
\ifnum\abbrevcnt=1%
  \footnotetext{%
    \removelastskip\vskip-3.5pt%
    \unvcopy\abbrevbox%
    \removelastskip\nointerlineskip\vskip0pt%
  }%
\else%
    \unvcopy\abbrevbox%
\fi%
  \endgroup%
}%

\AtBeginShipout{%%09Apr18_PSK%%
  \ifnum\value{page}=\number\numexpr\getpagerefnumber{pagesLTS.arabic}-2\relax%
    \phantomsection\label{preLastPage}%
  \fi%
}%

\def\howtociteyear{}%
\def\howtocitemonth{}%

\ifpurexml\relax\bgroup\catcode`\-\active%
  \gdef\grabhowtociteyear#1-#2\end{\gdef\howtociteyear{#1}\gdef\howtocitemonth{#2}}%
\egroup\fi%

\def\FPPjourvolinfo{9999}%
\def\FPPjourpageinfo{n/a}%
\def\FPPjourpageinfochk{n/a}%

\def\howtociteurlsettings#1{%
  \ifIssue\relax%
    \ifeLocatorid%
      \changeurlcolor{urlBlue}\color{urlBlue}\underline{\href{#1}{#1}}%\burlalt%
      \else{#1}\fi%
    \else%
      \changeurlcolor{urlBlue}\color{urlBlue}\underline{\href{#1}{#1}}%\burlalt%
    \fi%
}%

\gdef\Minihb{}%
\gdef\Minibreak{}%

\def\howbreak#1{\gdef\how@break{#1}}\howbreak{}

\def\selfcomma{,}%
\def\AUselffullstop{.}%
\def\TITselffullstop{.}%
\def\SHTITselffullstop{.}%
\def\PGselffullstop{.}%

\def\TCHL#1#2{\multicolumn{#1}{>{\columncolor{TabColHeadColor}}l}{\tablecolheadfont#2}}% center
\def\fTCHL#1#2{\multicolumn{#1}{@{\hskip6pt}l}{\tablecolheadfont#2}}% center
\def\TCHC#1#2{\multicolumn{#1}{>{\columncolor{TabColHeadColor}}c}{\tablecolheadfont#2}}% center
\def\lTCHL#1#2{\multicolumn{#1}{>{\columncolor{TabColHeadColor}}l@{}}{\tablecolheadfont#2}}% center

%%%15FEBSHE%%%

\newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp}%

\let\PBS=\PreserveBackslash%
\newcommand{\tabpara}{\PBS\raggedright\hangindent1em}%
\newcommand{\ttablepara}{\raggedright\par\hangindent1em}%
\newcommand{\ctabpara}{\PBS\raggedcenter}%
\newcommand{\ltabpara}{\PBS\raggedleft}%
\newcommand{\rtabpara}{\PBS\raggedright}%

%% Macros related to LWcuted.sty - Begin %%

\newdimen\Twocolleftdim%
\Twocolleftdim=0pt%

\newdimen\Twocolrightdim%
\Twocolrightdim=0pt%

\newdimen\TwocolBalancedim%
\TwocolBalancedim=-5pt%

\newdimen\TwocolUnBalancedim%
\TwocolUnBalancedim=-4.66pt% org

%% Macros related to LWcuted.sty - End %%

\newcommand{\ddbar}{\setbox0=\hbox{d}%
   {\mathop{\hbox{d}}\limits^{\vbox to -6.3\ex@{\kern-\tw@\ex@
    \hbox to\wd0{\hfill\hbox to 3pt{\hrulefill}}\vss}}}}

\def\CEmailI{}%

\newif\ifNOneedAMSref%
\global\NOneedAMSreffalse%
\global\APARefstyletrue

\global\let\corrnote\titlenotes%

\def\astrickdefns{\fontsize{8}{0}\selectfont\lower2pt\hbox{*}}
\gdef\@notefnsymbol#1{\ifcase#1\or \astrickdefns\or \dag\or \ddag%
   \or \S \or \P\or \# \or \textbardbl \or \astrickdefns\astrickdefns\or \dag\dag%
   \or \ddag\ddag\or \S\S\or \P\P\or \#\#%
   \or \textbardbl\textbardbl\or \astrickdefns\astrickdefns\astrickdefns\or \dag\dag\dag%
   \or \ddag\ddag\ddag\or \S\S\S
   \or \P\P\P\or \#\#\# \or \textbardbl\textbardbl\textbardbl\or %
\astrickdefns\astrickdefns\astrickdefns\astrickdefns\or%
\dag\dag\dag\dag  \or \ddag\ddag\ddag\ddag\or \S\S\S\S%
   \or \P\P\P\P\or \#\#\#\# \or \textbardbl\textbardbl\textbardbl\textbardbl\or%
\astrickdefns\astrickdefns\astrickdefns\astrickdefns\astrickdefns\or%
\dag\dag\dag\dag\dag  \or \ddag\ddag\ddag\ddag\ddag\or \S\S\S\S\S%
   \or \P\P\P\P\P \or \#\#\#\#\#\or \textbardbl\textbardbl\textbardbl\textbardbl\textbardbl\or%
\astrickdefns\astrickdefns\astrickdefns\astrickdefns\astrickdefns\astrickdefns\or%
\dag\dag\dag\dag\dag\dag  \or \ddag\ddag\ddag\ddag\ddag\ddag\or \S\S\S\S\S\S%
   \or \P\P\P\P\P\P \or \#\#\#\#\#\#\or \textbardbl\textbardbl\textbardbl\textbardbl\textbardbl\textbardbl%
\astrickdefns\astrickdefns\astrickdefns\astrickdefns\astrickdefns\astrickdefns\astrickdefns\or%
\dag\dag\dag\dag\dag\dag\dag  \or \ddag\ddag\ddag\ddag\ddag\ddag\ddag\or \S\S\S\S\S\S\S%
   \or \P\P\P\P\P\P\P \or \#\#\#\#\#\#\#\or \textbardbl\textbardbl\textbardbl\textbardbl\textbardbl\textbardbl\textbardbl%
\else\@ctrerr\fi\relax}%

\def\enddocument{%
\def\@currentlabel{\arabic{page}}\label{aendpage}%
   \let\AtEndDocument\@firstofone
   \@enddocumenthook
   \@checkend{document}%
 \clearpage
   \begingroup
     \if@filesw
       \immediate\closeout\@mainaux
       \let\@setckpt\@gobbletwo
       \let\@newl@bel\@testdef
       \@tempswafalse
       \makeatletter \input\jobname.aux%
     \fi
     \@dofilelist
     \ifdim \font@submax >\fontsubfuzz\relax
       \@font@warning{Size substitutions with differences\MessageBreak
                  up to \font@submax\space have occurred.\@gobbletwo}%
     \fi
     \@defaultsubs
     \@refundefined
     \if@filesw
       \ifx \@multiplelabels \relax
         \if@tempswa
           \@latex@warning@no@line{Label(s) may have changed.
               Rerun to get cross-references right}%
         \fi
       \else
         \@multiplelabels
       \fi
     \fi	
        \endgroup
   \deadcycles\z@\@@end}%

\endinput
